CI: remove --check-files and add conditional to prevent duplicate run #1042
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re-added
--check-files
, which was removed due to actions/cache infrequently giving a false positive "cache hit" on Windows runner. The problem is that the Windows runner has reverted back to taking > 10 min for each node version. There have been a couple of updates to actions/cache, so I'm curious if there's been any improvement on Windows.Looking into the Windows long run time specifically, there is an issue with Yarn giving a warning "There appears to be trouble with your network connection. Retrying...", which seems to account for half of the runtime. There's a lot of conversation about this in Yarn Package GH Issues. This comment seems to be the most helpful as a potential next step to fix: yarnpkg/yarn#5259 (comment) I think it would require creating a
.yarnrc
file in root with the registry and HTTP changes suggested.[Update]
Also added something I've been wanting to try --> a conditional so that the whole Action will not re-run when a PR is merged.
Problem: because this triggers on both Push and specific PR events, when a PR is merged, the action is effectively re-triggered. We need to have the Push trigger because there are some occasional instances when a direct push to
main
is needed.Solution: I added the conditional
if: github.event.pull_request.merged == false
at the beginning of thejobs
. This should allow a direct push to trigger the full runner. However, if the trigger is due to a PR merge event, then the action will trigger but thejobs
will not run.