Skip to content

CI runs the PyAthena suite for pull requests that change no file it uses #911

Description

@laughingman7743

Use case

The Test workflow skips a pull request that changes only docs/** or **.md through paths-ignore. Any other ready pull request always runs the PyAthena suite (the test job in .github/workflows/test.yaml) against AWS, even when it changes no file the suite uses.

Since 2026-06-01, five pull requests merged into master changed only such files:

Each Ready run, and each later push to a Ready pull request, spent an Athena run on the PyAthena suite without testing anything those pull requests changed.

Proposed change

After #906, the changes job selects the SQLAlchemy and Spark tests with dorny/paths-filter. Add a third filter, pyathena, as an allowlist of the files the PyAthena suite depends on:

  • the existing shared files: .github/workflows/test.yaml, .github/workflows/test-suite.yaml, justfile, pyproject.toml (including the tox configuration), uv.lock
  • pyathena/**, tests/**, setup.cfg

Run the test job only when that output is true. Every path that sqla or spark selects is also in this list, so the SQLAlchemy and Spark tests are never selected without the PyAthena suite. Schedule, dispatch, and Release runs keep running every suite, as the other outputs already do.

Keep the trigger's paths-ignore as it is, rather than switching the trigger to a paths: allowlist. The lint job in the same workflow runs just lint over the whole repository: ruff and mypy, license headers, and cfn-lint for cloudformation/. It must keep running for pull requests that change only benchmarks/, scripts/, or cloudformation/.

A file missing from the allowlist would skip the suite for a pull request that needs it. The weekly scheduled run and the Release workflow still run every suite, so such a miss surfaces there, the same as for the SQLAlchemy and Spark selection.

Apply the same change to the 3.x branch afterwards, whose workflow matches master's after the #906 backport (#910).

Validation plan (if implementing)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions