From 131622d190a179027f7d6dfd33a750978daa94f2 Mon Sep 17 00:00:00 2001 From: allen0099 Date: Fri, 25 Sep 2026 17:34:18 +0000 Subject: [PATCH] ci: run the test, lint, tox and coverage checks on every pull request 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. --- .github/workflows/coverage.yml | 8 ++++---- .github/workflows/lint.yml | 8 ++++---- .github/workflows/test.yml | 8 ++++---- .github/workflows/tox.yml | 9 ++++----- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 220e290..43a9645 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,12 +7,12 @@ on: - '**.py' - 'pyproject.toml' - '.github/workflows/coverage.yml' + # No paths filter on pull requests, so this check can be required before + # merging: a required check that never starts blocks the pull request. It + # also covers pull requests that only touch files outside the push filter, + # such as CHANGELOG.md, whose format tests/test_changelog_release.py checks. pull_request: branches: [ "master" ] - paths: - - '**.py' - - 'pyproject.toml' - - '.github/workflows/coverage.yml' permissions: contents: write diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 14c5161..945a165 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,12 +7,12 @@ on: - '**.py' - 'pyproject.toml' - '.github/workflows/lint.yml' + # No paths filter on pull requests, so this check can be required before + # merging: a required check that never starts blocks the pull request. It + # also covers pull requests that only touch files outside the push filter, + # such as CHANGELOG.md, whose format tests/test_changelog_release.py checks. pull_request: branches: [ "master" ] - paths: - - '**.py' - - 'pyproject.toml' - - '.github/workflows/lint.yml' jobs: lint: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a653c1..2f2c7e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,12 +7,12 @@ on: - '**.py' - 'pyproject.toml' - '.github/workflows/test.yml' + # No paths filter on pull requests, so this check can be required before + # merging: a required check that never starts blocks the pull request. It + # also covers pull requests that only touch files outside the push filter, + # such as CHANGELOG.md, whose format tests/test_changelog_release.py checks. pull_request: branches: [ "master" ] - paths: - - '**.py' - - 'pyproject.toml' - - '.github/workflows/test.yml' jobs: test: diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index a077f42..53c5691 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -8,13 +8,12 @@ on: - 'pyproject.toml' - 'tox.ini' - '.github/workflows/tox.yml' + # No paths filter on pull requests, so this check can be required before + # merging: a required check that never starts blocks the pull request. It + # also covers pull requests that only touch files outside the push filter, + # such as CHANGELOG.md, whose format tests/test_changelog_release.py checks. pull_request: branches: [ "master" ] - paths: - - '**.py' - - 'pyproject.toml' - - 'tox.ini' - - '.github/workflows/tox.yml' jobs: tox: