Skip to content

ci: run the test, lint, tox and coverage checks on every pull request - #154

Merged
allen0099 merged 1 commit into
masterfrom
ci/run-checks-on-every-pr
Sep 25, 2026
Merged

allen0099 merged 1 commit into
masterfrom
ci/run-checks-on-every-pr

Conversation

@allen0099

@allen0099 allen0099 commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Why

The pull_request triggers of test.yml, lint.yml, tox.yml and coverage.yml had the same paths filter as their push triggers: Python files, pyproject.toml, and the workflow file itself. That caused two problems:

  1. The changelog check from release: list one line per change in the GitHub release notes #153 didn't run where it matters. A pull request that changes only CHANGELOG.md never ran the tests, so test_the_repository_changelog_can_be_released didn't check it. An entry without a bold summary would only have failed during the release. The same applied to pull requests that change only uv.lock (e.g. Renovate lock-file maintenance) or tox.ini.
  2. These checks couldn't be required before merging. A required check whose workflow is filtered out never reports, so a docs-only pull request would wait for it forever.

What changes

  • The pull_request triggers of those four workflows no longer have a paths filter.
  • The push triggers keep theirs, since master has already been checked through its pull requests.
  • docs.yml and renovate-validate.yml are unchanged.

Cost

The slowest of these checks is tox, which takes about 4 minutes. Test, coverage and lint take about 1 minute each. The repository is public, so Actions minutes are free.

Follow-up

After this is merged, master can get a ruleset rule that requires these checks to pass before merging. That is a repository setting, not part of this PR. The release workflow pushes its release commit to master directly, so that rule needs a bypass for GitHub Actions. The existing "Protect master" ruleset blocks only deletion and force pushes, so it doesn't affect the release.

Verification

This pull request can't show the change working: each of the four workflows lists its own file in its paths, so they would run on this pull request under the old filters too. The first pull request that touches only docs or CHANGELOG.md after the merge will show it: test, lint, tox and coverage should all run on it.

The workflow files pass the pre-commit check-yaml hook.

The pull_request triggers of these four workflows had the same paths
filter as their push triggers (Python files, pyproject.toml and the
workflow itself). That caused two problems.

A pull request that changes only CHANGELOG.md never ran the tests, so
the changelog format check added in #153
(test_the_repository_changelog_can_be_released) did not run on it. A
changelog entry without a bold summary would only have failed at release
time. The same applied to pull requests that change only uv.lock or
tox.ini.

These checks also could not be made required before merging. A required
check whose workflow is filtered out never reports, so the pull request
would wait for it forever.

The pull_request triggers now have no paths filter. The push triggers
keep theirs, since master has already been checked through its pull
requests. The slowest check is tox, at about four minutes.
@allen0099
allen0099 merged commit c1ed0ef into master Sep 25, 2026
10 checks passed
@allen0099
allen0099 deleted the ci/run-checks-on-every-pr branch September 26, 2026 11:49
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.

1 participant