Skip to content

[skip changelog] Fix test workflow not running when editing docs #850

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

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

silvanocerza
Copy link
Contributor

@silvanocerza silvanocerza commented Jul 22, 2020

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

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:

    paths-ignore:
      - "docs/**"
      - ".github/workflows/docs.yaml"

Both when pushing on master and PRs creation if only docs.yaml or anything inside the docs 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 on test-matrix but on test-matrix (ubuntu-latest), test-matrix (windows-latest) and test-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 the test-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

@silvanocerza silvanocerza self-assigned this Jul 22, 2020
@silvanocerza silvanocerza merged commit 983e523 into master Jul 22, 2020
@silvanocerza silvanocerza deleted the scerza/test-workflow-fix branch July 22, 2020 15:43
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