Skip to content

Commit

Permalink
Only run CI on changes that would affect its outcome
Browse files Browse the repository at this point in the history
There are two ways to do this¹: paths and paths-ignore. I chose paths
since it is more self-documenting.

Since this specified on the workflow level and applies to all jobs, in
the future we can consider splitting this file into multiple - one file
per group of jobs that depends on the same set of files (e.g. the docs
project is independent of other testing, so it's useless to run on
changes to test files).

¹ <https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-only-when-a-push-affects-specific-files>
  • Loading branch information
victorlin committed Dec 20, 2023
1 parent ea5104f commit 9c85aab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ on:
push:
branches:
- master
paths:
- .github/workflows/ci.yaml
- augur/
- docs/

# Used for testing
- bin/
- scripts/
- tests/
- .coveragerc
- .cramrc
- .flake8
- codecov.yml
- mypy.ini
- pytest.python3.ini

# Routinely check that tests pass with new versions of dependencies.
schedule:
Expand Down

0 comments on commit 9c85aab

Please sign in to comment.