-
Notifications
You must be signed in to change notification settings - Fork 92
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
Skip duplicated Github actions run #110
Conversation
@sgerrand Could you please take a look? |
As a general comment, suggest separating your changes into logical commits in future. Reviewing three separate changes in one commit is laborious. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for using fkirc/skip-duplicate-actions
to prevent duplicate workflow runs. I can see how this might become frustrating for contributors. I've suggested locking the action to a known version to prevent errors from updates but otherwise it seems fine.
I have posed a number of questions around the other changes which were included in this commit. Would you please respond to them when you can.
Co-authored-by: Sasha Gerrand <sgerrand@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
Thank you @dolfinus for your contribution! |
Hello.
There is an annoying fact about Github Actions - sometimes it runs actions twice. For example:
Running a workflow twice does not make any sense, it just takes twice the time without any useful side effect.
In this PR I've added a separated job of checking if another copy of workflow already started: https://github.com/fkirc/skip-duplicate-actions
This job allows to:
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 ofmix.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.
Also I've moved documentation check step after running tests because there is no need to check documentation of code which does not work.
What do you think about that?