From 2c369bf670a43bb65a36c26fbe38c1fb29d082e8 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Thu, 1 Oct 2026 10:17:28 +0900 Subject: [PATCH 1/4] ci: run the PyAthena suite only when its files change Add a pyathena output to the changes job, an allowlist of the package, the tests, setup.cfg, and the shared build files, and run the test job only when it is true. It is a superset of the sqla and spark filters, so their tests never run without the PyAthena suite. Events other than pull_request still run every suite. The trigger keeps paths-ignore, so the lint job still runs for pull requests that change only benchmarks, scripts, or CloudFormation templates. Update docs/testing.md for this and for the shared core paths that #906 added to the SQLAlchemy and Spark selection. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yaml | 20 +++++++++++++++----- docs/testing.md | 7 ++++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3bf426e80..070f7e81a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -65,11 +65,12 @@ jobs: - run: just lint # Selects the AWS suites and Python versions. Draft and external-fork pull - # requests run none. A ready pull request always runs the PyAthena suite; it - # runs the SQLAlchemy tests (the compliance suites and the PyAthena suite's - # SQLAlchemy tests) and the Spark tests only when their code, tests, - # dependencies, this workflow, the top-level modules of pyathena and - # pyathena.aio, or the shared test fixtures change. Pull requests and the + # requests run none. A ready pull request runs the PyAthena suite only when + # the package, the tests, setup.cfg, the dependencies, or this workflow + # change; it runs the SQLAlchemy tests (the compliance suites and the + # PyAthena suite's SQLAlchemy tests) and the Spark tests only when their + # code, tests, dependencies, this workflow, the top-level modules of pyathena + # and pyathena.aio, or the shared test fixtures change. Pull requests and the # schedule test the newest Python version; a dispatch tests the requested # versions or every version, and the Release workflow every version. changes: @@ -81,6 +82,7 @@ jobs: permissions: pull-requests: read outputs: + pyathena: ${{ github.event_name != 'pull_request' || steps.paths.outputs.pyathena == 'true' }} sqla: ${{ github.event_name != 'pull_request' || steps.paths.outputs.sqla == 'true' }} spark: ${{ github.event_name != 'pull_request' || steps.paths.outputs.spark == 'true' }} python-versions: ${{ steps.versions.outputs.python-versions }} @@ -125,6 +127,13 @@ jobs: - pyathena/aio/spark/** - tests/pyathena/spark/** - tests/pyathena/aio/spark/** + # A superset of sqla and spark, so their tests never run without + # the PyAthena suite. + pyathena: + - *shared + - setup.cfg + - pyathena/** + - tests/** - id: versions env: EVENT_NAME: ${{ github.event_name }} @@ -156,6 +165,7 @@ jobs: # parallel; each is still a separate job for "Re-run failed jobs". test: needs: changes + if: needs.changes.outputs.pyathena == 'true' uses: ./.github/workflows/test-suite.yaml with: test-type: pyathena diff --git a/docs/testing.md b/docs/testing.md index 803ef28e0..41cb921a7 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -155,7 +155,7 @@ It runs the offline checks (`just lint`) on each of them, including Drafts and e | Trigger | PyAthena suite | SQLAlchemy tests | Spark tests | Python versions | | --- | --- | --- | --- | --- | | Draft pull request | No | No | No | None | -| Ready pull request from a branch of this repository | Yes | When related files change | When related files change | Newest supported | +| Ready pull request from a branch of this repository | When related files change | When related files change | When related files change | Newest supported | | Weekly schedule | Yes | Yes | Yes | Newest supported | | Manual dispatch | Yes | Yes | Yes | Requested, or all supported | | Release tag (Release workflow) | Yes | Yes | Yes | All supported | @@ -163,9 +163,10 @@ It runs the offline checks (`just lint`) on each of them, including Drafts and e The SQLAlchemy tests are the compliance suites and the PyAthena suite's `tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`. The Spark tests are the PyAthena suite's `tests/pyathena/spark/` and `tests/pyathena/aio/spark/`. When the SQLAlchemy or Spark tests do not run, the PyAthena suite runs without them. -For the SQLAlchemy tests, the related files are `pyathena/sqlalchemy/`, `pyathena/aio/sqlalchemy/`, `tests/sqlalchemy/`, their PyAthena suite test directories, and `setup.cfg`. +For the PyAthena suite, the related files are `pyathena/`, `tests/`, and `setup.cfg`. +For the SQLAlchemy tests, they are `pyathena/sqlalchemy/`, `pyathena/aio/sqlalchemy/`, `tests/sqlalchemy/`, their PyAthena suite test directories, and `setup.cfg`. For the Spark tests, they are `pyathena/spark/`, `pyathena/aio/spark/`, and their PyAthena suite test directories. -Changes to `pyproject.toml`, `uv.lock`, `justfile`, or the Test workflows run both. +Changes to the modules directly under `pyathena/` and `pyathena/aio/`, the shared test fixtures such as `tests/pyathena/conftest.py` and `tests/resources/`, `pyproject.toml`, `uv.lock`, `justfile`, or the Test workflows run all three. For a pull request from a branch of this repository that still changes files other than `docs/` and Markdown, marking the Draft ready for review starts the AWS jobs, and converting it back to Draft cancels AWS jobs still running. To run every suite on a branch, dispatch the workflow; it tests every supported Python version unless `python-versions` lists some of them: From dfc14e24ae3003a4418aa90b3bed2c607ea0027c Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Thu, 1 Oct 2026 10:18:19 +0900 Subject: [PATCH 2/4] docs: say marking Ready starts only the selected AWS jobs Co-Authored-By: Claude Opus 5.5 --- docs/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/testing.md b/docs/testing.md index 41cb921a7..545221b26 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -167,7 +167,7 @@ For the PyAthena suite, the related files are `pyathena/`, `tests/`, and `setup. For the SQLAlchemy tests, they are `pyathena/sqlalchemy/`, `pyathena/aio/sqlalchemy/`, `tests/sqlalchemy/`, their PyAthena suite test directories, and `setup.cfg`. For the Spark tests, they are `pyathena/spark/`, `pyathena/aio/spark/`, and their PyAthena suite test directories. Changes to the modules directly under `pyathena/` and `pyathena/aio/`, the shared test fixtures such as `tests/pyathena/conftest.py` and `tests/resources/`, `pyproject.toml`, `uv.lock`, `justfile`, or the Test workflows run all three. -For a pull request from a branch of this repository that still changes files other than `docs/` and Markdown, marking the Draft ready for review starts the AWS jobs, and converting it back to Draft cancels AWS jobs still running. +For a pull request from a branch of this repository that still changes files other than `docs/` and Markdown, marking the Draft ready for review starts the selected AWS jobs, and converting it back to Draft cancels AWS jobs still running. To run every suite on a branch, dispatch the workflow; it tests every supported Python version unless `python-versions` lists some of them: ```bash From e737245e6ecabe1f77660e19ff6153d906933c28 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Thu, 1 Oct 2026 10:22:24 +0900 Subject: [PATCH 3/4] docs: scope the sentence on skipped SQLAlchemy and Spark tests to suite runs Co-Authored-By: Claude Opus 5.5 --- docs/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/testing.md b/docs/testing.md index 545221b26..386e868f1 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -162,7 +162,7 @@ It runs the offline checks (`just lint`) on each of them, including Drafts and e The SQLAlchemy tests are the compliance suites and the PyAthena suite's `tests/pyathena/sqlalchemy/` and `tests/pyathena/aio/sqlalchemy/`. The Spark tests are the PyAthena suite's `tests/pyathena/spark/` and `tests/pyathena/aio/spark/`. -When the SQLAlchemy or Spark tests do not run, the PyAthena suite runs without them. +When the PyAthena suite runs but the SQLAlchemy or Spark tests do not, it runs without them. For the PyAthena suite, the related files are `pyathena/`, `tests/`, and `setup.cfg`. For the SQLAlchemy tests, they are `pyathena/sqlalchemy/`, `pyathena/aio/sqlalchemy/`, `tests/sqlalchemy/`, their PyAthena suite test directories, and `setup.cfg`. For the Spark tests, they are `pyathena/spark/`, `pyathena/aio/spark/`, and their PyAthena suite test directories. From 692d623dc57bc9ef4d1a03021e8eab686dc06752 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Thu, 1 Oct 2026 10:23:42 +0900 Subject: [PATCH 4/4] docs: allow for no AWS job when a Draft is marked ready Co-Authored-By: Claude Opus 5.5 --- docs/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/testing.md b/docs/testing.md index 386e868f1..575d1676e 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -167,7 +167,7 @@ For the PyAthena suite, the related files are `pyathena/`, `tests/`, and `setup. For the SQLAlchemy tests, they are `pyathena/sqlalchemy/`, `pyathena/aio/sqlalchemy/`, `tests/sqlalchemy/`, their PyAthena suite test directories, and `setup.cfg`. For the Spark tests, they are `pyathena/spark/`, `pyathena/aio/spark/`, and their PyAthena suite test directories. Changes to the modules directly under `pyathena/` and `pyathena/aio/`, the shared test fixtures such as `tests/pyathena/conftest.py` and `tests/resources/`, `pyproject.toml`, `uv.lock`, `justfile`, or the Test workflows run all three. -For a pull request from a branch of this repository that still changes files other than `docs/` and Markdown, marking the Draft ready for review starts the selected AWS jobs, and converting it back to Draft cancels AWS jobs still running. +For a pull request from a branch of this repository that still changes files other than `docs/` and Markdown, marking the Draft ready for review starts any AWS jobs its changed files select, and converting it back to Draft cancels AWS jobs still running. To run every suite on a branch, dispatch the workflow; it tests every supported Python version unless `python-versions` lists some of them: ```bash