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
21 changes: 2 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,5 @@ on:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[async]"
pip install pytest pytest-asyncio

- name: Run tests
run: pytest tests/ -v
# Calls the reusable workflow with the full 3.9-3.13 matrix for PRs.
uses: ./.github/workflows/test.yml
23 changes: 6 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,12 @@ permissions:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.11', '3.13']
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}

- name: Install and test
run: |
python -m pip install --upgrade pip
pip install -e ".[async]"
pip install pytest pytest-asyncio
pytest tests/ -v
# Calls the reusable workflow with a reduced 3.9/3.11/3.13 matrix for
# release gate — slightly less coverage than CI since PRs already
# exercised the full 3.9-3.13 matrix before getting here.
uses: ./.github/workflows/test.yml
with:
python-versions: '["3.9", "3.11", "3.13"]'

publish:
needs: test
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

# Reusable workflow called by ci.yml (PR gate) and publish.yml (tag gate).
# Single source of truth for install + test. If a test dep changes, update
# this file only — both callers pick it up automatically.

on:
workflow_call:
inputs:
python-versions:
description: 'JSON array of Python versions to test'
required: false
type: string
default: '["3.9", "3.10", "3.11", "3.12", "3.13"]'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ${{ fromJSON(inputs.python-versions) }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}

- name: Install and test
run: |
python -m pip install --upgrade pip
pip install -e ".[async]"
pip install pytest pytest-asyncio
pytest tests/ -v