Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
54 changes: 54 additions & 0 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test Suite

on:
workflow_call:
inputs:
test-type:
required: true
type: string

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
59 changes: 16 additions & 43 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test

on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'

Expand All @@ -11,45 +11,18 @@ permissions:

jobs:
test:
runs-on: ubuntu-latest

env:
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]
uses: ./.github/workflows/test-suite.yaml
with:
test-type: sqla

test-sqla-async:
needs: [test-sqla]
uses: ./.github/workflows/test-suite.yaml
with:
test-type: sqla_async
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -188,16 +188,22 @@ python =
3.13: py313
3.14: py314

[gh-actions:env]
TEST_TYPE =
pyathena: pyathena
sqla: sqla
sqla_async: sqla_async

[testenv]
allowlist_externals =
uv
uvx
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_*
Expand Down