Skip to content
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

Improve Github actions #181

Merged
merged 2 commits into from
Mar 22, 2021
Merged

Improve Github actions #181

merged 2 commits into from
Mar 22, 2021

Conversation

dolfinus
Copy link
Contributor

@dolfinus dolfinus commented Mar 20, 2021

Hello.

It looks like commiting to branches excluding master does not run Github Actions. So users which are working on feature/bugfix branches cannot see that their changes are leading to failed tests until they'll create a pull request to master branch.
So I've removed restriction against branch name for push events.

Also I've found another quite annoying bug - step actions/cache does not update cache item if it was restored using a primary key.
For example, some dependencies like dialyzer or other ones store their files in deps or _build folders (which are cached in the workflow). But when these dependencies perform some updates of these folders, it does not lead to the updating of mix.lock file. File hasn't been changed -> hash is the same -> cache primary key is the same -> caching action will not update the existing cache.
This will cause the increase of workflow run time because the stored cache will not be used by some steps. Until mix.lock will be updated which will lead to updating the cache item.
Here I've appended a commit SHA to the cache primary key, so it will always be updated. But it will not affect cache reading.

What do you think about that?

@dolfinus dolfinus changed the title Skip duplicates Github actions run Skip duplicated Github actions run Mar 20, 2021
Copy link
Contributor

@binaryseed binaryseed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the absinthe PR, I'd prefer not to complicate the workflow with the skip logic, but the cache key improvements & running on all branches are welcome changes

@dolfinus dolfinus changed the title Skip duplicated Github actions run Improve Github actions Mar 22, 2021
@dolfinus
Copy link
Contributor Author

Done.

.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
@binaryseed binaryseed merged commit c7be8e5 into absinthe-graphql:master Mar 22, 2021
@binaryseed
Copy link
Contributor

Thanks!

@dolfinus dolfinus deleted the skip_duplicated_runs branch March 22, 2021 19:26
@dolfinus
Copy link
Contributor Author

I've also added a PR into some other absinthe repos with the same actions set:
absinthe-graphql/absinthe_plug#253
absinthe-graphql/absinthe_phoenix#84
absinthe-graphql/dataloader#121

@dolfinus dolfinus mentioned this pull request Mar 23, 2021
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