Skip to content

ci: use local version for PRs #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 20, 2024
Merged

Conversation

Borda
Copy link
Contributor

@Borda Borda commented Dec 14, 2023

this enables proper testing of a change from PR 🦩
atm any PR is not really testing code that is changed but the code from the master...

cc: @jamesmortensen

@Borda Borda changed the title ci: use github.sha for PRs ci: use local version for PRs Dec 15, 2023
@jamesmortensen
Copy link
Owner

Hi @Borda thanks again for the contributions.

Initially, this CI workflow was setup as a demo, I think because I didn't yet have a plan for how to validate automatically that the action behaves correctly for both cache hits and cache misses. Since there's no assertions, you can see that both jobs are passing, even though it's not actually validating whether or not a cache miss or cache hit happened.

In fact, you can see that both "cache miss" and "cache hit" jobs are executing the "Run this if there is a cache hit" step. The only way to validate the action is working is by reading the steps manually.

Screenshot 2023-12-15 at 5 10 41 AM

I'm not sure the changes is sufficient to validate that the action is functioning correctly. What do you think?

@Borda
Copy link
Contributor Author

Borda commented Dec 15, 2023

I'm not sure the changes is sufficient to validate that the action is functioning correctly. What do you think?

if I got what you mean we can simply add some crash meaning:

- name: this shall not ever happen
  if: output.my-name != ''
  run: exit 1

which will make the workflow fail and so PR shall not be merged

@Borda
Copy link
Contributor Author

Borda commented Dec 15, 2023

so updating this PR such as:

      - name: Show output of cache hit
        run: echo "${{ steps.cache-container-images.outputs.cache-hit }}"

      - name: Terminate if cache was not hit
        if: ${{ steps.cache-container-images.outputs.cache-hit != 'true' }}
        run: exit 1

@Borda
Copy link
Contributor Author

Borda commented Dec 21, 2023

@jamesmortensen mind checking the updated version 🐿️

@Borda
Copy link
Contributor Author

Borda commented Jan 9, 2024

@jamesmortensen how is it going? 🦩

@jamesmortensen jamesmortensen merged commit 5403eeb into jamesmortensen:master Jan 20, 2024
@jamesmortensen
Copy link
Owner

Hi @Borda sorry for the delay and lack of communication in getting to this. (Going through a transition from one country to another and still getting settled in).

I went ahead and merged. Thanks again!

@Borda Borda deleted the ci/sha branch January 21, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants