From 32059be4d2af16bee3429911b703d4bf27fff67a Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Sun, 22 Feb 2026 00:17:13 +0900 Subject: [PATCH 1/4] Fix release workflow uploading .gitignore as asset The `dist/*` glob pattern matched the `.gitignore` file in the dist/ directory, which GitHub API renamed to `default.gitignore` when uploading as a release asset. Use explicit file patterns (*.whl and *.tar.gz) to only upload actual build artifacts. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b8ca0912..c57860da 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,5 +33,7 @@ jobs: - name: Release uses: softprops/action-gh-release@v2 with: - files: dist/* + files: | + dist/*.whl + dist/*.tar.gz generate_release_notes: true From 8c3be28e1b542c84b1e56f7604df1b536c888bfd Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Sun, 22 Feb 2026 00:52:26 +0900 Subject: [PATCH 2/4] Split CI test jobs for independent retries Split the single test job into 3 sequential jobs (test, test-sqla, test-sqla-async) to enable "Re-run failed jobs" in GitHub Actions UI. Each job sets a TEST_TYPE env var that tox-gh-actions uses to select the appropriate tox factor. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/test.yaml | 87 +++++++++++++++++++++++++++++++++++++ pyproject.toml | 14 ++++-- 2 files changed, 97 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 504b0b50..f37530b4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest env: + TEST_TYPE: pyathena AWS_DEFAULT_REGION: us-west-2 AWS_ATHENA_S3_STAGING_DIR: s3://laughingman7743-pyathena/github/ AWS_ATHENA_WORKGROUP: pyathena @@ -53,3 +54,89 @@ jobs: - name: Test run: | make tox + + test-sqla: + needs: [test] + runs-on: ubuntu-latest + + env: + TEST_TYPE: sqla + AWS_DEFAULT_REGION: us-west-2 + AWS_ATHENA_S3_STAGING_DIR: s3://laughingman7743-pyathena/github/ + AWS_ATHENA_WORKGROUP: pyathena + AWS_ATHENA_SPARK_WORKGROUP: pyathena-spark + AWS_ATHENA_MANAGED_WORKGROUP: pyathena-managed + + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v5 + with: + python-version: ${{ matrix.python-version }} + enable-cache: true + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + if: matrix.python-version == '3.13' || matrix.python-version == '3.14' + - run: | + make tool + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::676287850544:role/github-actions-oidc-pyathena + role-session-name: PyAthenaTestSession + aws-region: ${{ env.AWS_DEFAULT_REGION }} + + - name: Test + run: | + make tox + + test-sqla-async: + needs: [test-sqla] + runs-on: ubuntu-latest + + env: + TEST_TYPE: sqla_async + AWS_DEFAULT_REGION: us-west-2 + AWS_ATHENA_S3_STAGING_DIR: s3://laughingman7743-pyathena/github/ + AWS_ATHENA_WORKGROUP: pyathena + AWS_ATHENA_SPARK_WORKGROUP: pyathena-spark + AWS_ATHENA_MANAGED_WORKGROUP: pyathena-managed + + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v5 + with: + python-version: ${{ matrix.python-version }} + enable-cache: true + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + if: matrix.python-version == '3.13' || matrix.python-version == '3.14' + - run: | + make tool + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::676287850544:role/github-actions-oidc-pyathena + role-session-name: PyAthenaTestSession + aws-region: ${{ env.AWS_DEFAULT_REGION }} + + - name: Test + run: | + make tox diff --git a/pyproject.toml b/pyproject.toml index d591f43f..cdb0a631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -178,7 +178,7 @@ exclude = [ legacy_tox_ini = """ [tox] isolated_build = true -envlist = py{310,311,312,313,314} +envlist = py{310,311,312,313,314}-{pyathena,sqla,sqla_async} [gh-actions] python = @@ -188,6 +188,12 @@ python = 3.13: py313 3.14: py314 +[gh-actions:env] +TEST_TYPE = + pyathena: pyathena + sqla: sqla + sqla_async: sqla_async + [testenv] allowlist_externals = uv @@ -195,9 +201,9 @@ allowlist_externals = make commands = uv sync --group dev - make test - make test-sqla - make test-sqla-async + pyathena: make test + sqla: make test-sqla + sqla_async: make test-sqla-async passenv = TOXENV AWS_* From 7165f23d0758940e2b6964426e23ec305824bad2 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Sun, 22 Feb 2026 01:11:31 +0900 Subject: [PATCH 3/4] Extract reusable test workflow and trigger on pull_request only - Extract common test steps into test-suite.yaml reusable workflow - Change test trigger from push to pull_request to avoid unnecessary CI runs on branch pushes and tag pushes - Weekly schedule trigger retained for periodic master validation Co-Authored-By: Claude Opus 4.6 --- .github/workflows/test-suite.yaml | 58 +++++++++++++ .github/workflows/test.yaml | 138 +++--------------------------- 2 files changed, 68 insertions(+), 128 deletions(-) create mode 100644 .github/workflows/test-suite.yaml diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml new file mode 100644 index 00000000..c14eb525 --- /dev/null +++ b/.github/workflows/test-suite.yaml @@ -0,0 +1,58 @@ +name: Test Suite + +on: + workflow_call: + inputs: + test-type: + required: true + type: string + +permissions: + id-token: write + contents: read + +jobs: + run: + runs-on: ubuntu-latest + + env: + TEST_TYPE: ${{ inputs.test-type }} + AWS_DEFAULT_REGION: us-west-2 + AWS_ATHENA_S3_STAGING_DIR: s3://laughingman7743-pyathena/github/ + AWS_ATHENA_WORKGROUP: pyathena + AWS_ATHENA_SPARK_WORKGROUP: pyathena-spark + AWS_ATHENA_MANAGED_WORKGROUP: pyathena-managed + + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v5 + with: + python-version: ${{ matrix.python-version }} + enable-cache: true + # TODO: In the case of Python 3.13+, the following error occurs, so install Python using setup-python. + # ../meson.build:44:2: ERROR: Problem encountered: Cannot compile + # `Python.h`. Perhaps you need to install python-dev|python-devel + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + if: matrix.python-version == '3.13' || matrix.python-version == '3.14' + - run: | + make tool + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::676287850544:role/github-actions-oidc-pyathena + role-session-name: PyAthenaTestSession + aws-region: ${{ env.AWS_DEFAULT_REGION }} + + - name: Test + run: | + make tox diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f37530b4..6d05bccb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,142 +1,24 @@ name: Test on: - push: + pull_request: schedule: - cron: '0 0 * * 0' -permissions: - id-token: write - contents: read - jobs: test: - runs-on: ubuntu-latest - - env: - TEST_TYPE: pyathena - AWS_DEFAULT_REGION: us-west-2 - AWS_ATHENA_S3_STAGING_DIR: s3://laughingman7743-pyathena/github/ - AWS_ATHENA_WORKGROUP: pyathena - AWS_ATHENA_SPARK_WORKGROUP: pyathena-spark - AWS_ATHENA_MANAGED_WORKGROUP: pyathena-managed - - strategy: - fail-fast: false - matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: astral-sh/setup-uv@v5 - with: - python-version: ${{ matrix.python-version }} - enable-cache: true - # TODO: In the case of Python 3.13+, the following error occurs, so install Python using setup-python. - # ../meson.build:44:2: ERROR: Problem encountered: Cannot compile - # `Python.h`. Perhaps you need to install python-dev|python-devel - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - if: matrix.python-version == '3.13' || matrix.python-version == '3.14' - - run: | - make tool - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::676287850544:role/github-actions-oidc-pyathena - role-session-name: PyAthenaTestSession - aws-region: ${{ env.AWS_DEFAULT_REGION }} - - - name: Test - run: | - make tox + uses: ./.github/workflows/test-suite.yaml + with: + test-type: pyathena test-sqla: needs: [test] - runs-on: ubuntu-latest - - env: - TEST_TYPE: sqla - AWS_DEFAULT_REGION: us-west-2 - AWS_ATHENA_S3_STAGING_DIR: s3://laughingman7743-pyathena/github/ - AWS_ATHENA_WORKGROUP: pyathena - AWS_ATHENA_SPARK_WORKGROUP: pyathena-spark - AWS_ATHENA_MANAGED_WORKGROUP: pyathena-managed - - strategy: - fail-fast: false - matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: astral-sh/setup-uv@v5 - with: - python-version: ${{ matrix.python-version }} - enable-cache: true - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - if: matrix.python-version == '3.13' || matrix.python-version == '3.14' - - run: | - make tool - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::676287850544:role/github-actions-oidc-pyathena - role-session-name: PyAthenaTestSession - aws-region: ${{ env.AWS_DEFAULT_REGION }} - - - name: Test - run: | - make tox + uses: ./.github/workflows/test-suite.yaml + with: + test-type: sqla test-sqla-async: needs: [test-sqla] - runs-on: ubuntu-latest - - env: - TEST_TYPE: sqla_async - AWS_DEFAULT_REGION: us-west-2 - AWS_ATHENA_S3_STAGING_DIR: s3://laughingman7743-pyathena/github/ - AWS_ATHENA_WORKGROUP: pyathena - AWS_ATHENA_SPARK_WORKGROUP: pyathena-spark - AWS_ATHENA_MANAGED_WORKGROUP: pyathena-managed - - strategy: - fail-fast: false - matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: astral-sh/setup-uv@v5 - with: - python-version: ${{ matrix.python-version }} - enable-cache: true - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - if: matrix.python-version == '3.13' || matrix.python-version == '3.14' - - run: | - make tool - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::676287850544:role/github-actions-oidc-pyathena - role-session-name: PyAthenaTestSession - aws-region: ${{ env.AWS_DEFAULT_REGION }} - - - name: Test - run: | - make tox + uses: ./.github/workflows/test-suite.yaml + with: + test-type: sqla_async From 0d8e57dacef043c6e090fdcd2afb566ae7dde6b8 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Sun, 22 Feb 2026 01:14:45 +0900 Subject: [PATCH 4/4] Fix OIDC permissions for reusable workflow Move permissions (id-token: write) to the caller workflow so the reusable workflow inherits the required OIDC token permission for AWS credential configuration. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/test-suite.yaml | 4 ---- .github/workflows/test.yaml | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index c14eb525..5c2a4599 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -7,10 +7,6 @@ on: required: true type: string -permissions: - id-token: write - contents: read - jobs: run: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6d05bccb..8e4a31c4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,6 +5,10 @@ on: schedule: - cron: '0 0 * * 0' +permissions: + id-token: write + contents: read + jobs: test: uses: ./.github/workflows/test-suite.yaml