absinthe-graphql / absinthe_relay

Absinthe support for the Relay framework
MIT License
181 stars 88 forks source link

Improve Github actions #181

Closed dolfinus closed 3 years ago

dolfinus commented 3 years ago

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 commented 3 years ago

Done.

binaryseed commented 3 years ago

Thanks!

dolfinus commented 3 years ago

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