[skip changelog] Fix test workflow not running when editing docs #850
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.
Please check if the PR fulfills these requirements
before creating one)
So I've investigated the issue about the CI skip and the required Checks to merge PRs, I've made some tests in a separate repo.
In the
test.yaml
I've added the following config:Both when pushing on
master
and PRs creation if onlydocs.yaml
or anything inside thedocs
folder is modified the Workflow is not run at all.We discovered that this is an issue because the repo is configured to require the 3 checks generated by the
test-matrix
job to merge a PR.So I tried to skip conditionally the whole job
test-matrix
, problem is that the required checks are not ontest-matrix
but ontest-matrix (ubuntu-latest)
,test-matrix (windows-latest)
andtest-matrix (macOS-latest)
; so GH still expects those checks.Easy you might say, set
test-matrix
as required so we can skip the whole job. Nope, can't do because if the matrix is actually run thetest-matrix
check is never run.So the only solution that I've come up is to skip every single step in
test-matrix
job, so that it's as if the whole test matrix is run, this way GH is happy because checks are passing.This is the repo I've used for testing: https://github.com/silvanocerza/nodenode
We discussed several solutions but decided to keep it simple and avoid workarounds that might be hard to understand in the future, therefore we remove the
paths-ignore
for the test workflow and run the whole test matrix in any case.See how to contribute