Closed ueqri closed 2 weeks ago
I am 100% in support of this change! I also agree that the CI should not run if there are non-functional changes.
A potential issue you may run into is that there are required tests in our PR flow (sets of tests which must succeed in order for the code to be merged in). If the CI does not run for documentation changes, the PR may never be merged since it did not pass the required tests. I am not sure the best way to resolve this issue, but it should be resolved.
Also, maybe GitHub handles this on its own! I would not be surprised if there are some checks in place to allow PRs to merge if they specifically request not to run!
Some tests won't run, so we'll have to merge despite that. Let's go with that for now ... too bad we can't mark the docs as needing a smaller list of checks.
Proposed Behaviour
We should prevent the CI running (particularly, the
.github/workflows/test.yml
) if only the documentation files are updated.Current Behaviour
Any push or PR that includes ONLY documentation changes (e.g., changes to the developer guide or README) will trigger all current CI workflows, which could be unnecessary and a waste of CI resources.
Possible Solution
Add a
path-ignore
filter to the GitHub Actions workflow triggers to filter out the docs changes, https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-excluding-pathsSpecifically, we can add
path-ignore
filters to thepush
andpull_request
triggers (using use push as an example below):Small limitations: in the PR scenario, the filter will consider all commits (not just a single, or the latest commit) of a PR. In this case, any commit that includes a file not matching the patterns, along with any subsequent commits, will trigger the workflow.
Note
Currently, the VTR online documentation is built automatically based on the
.readthedocs.yaml
through Read the Docs Services. The build service (independent from GitHub Actions CI) is triggered whenever there is a push to the master branch.Therefore, skipping all the current GitHub CI workflows won't affect the current online documentation build.