Skip to content
Merged
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
38 changes: 30 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
name: tests

on:
# A pull request is tested once (not again for its branch push); main and release tags are tested on push.
push:
branches: [main]
tags: ["v*"]
pull_request:
workflow_dispatch:
schedule:
- cron: "17 4 * * 1" # weekly: the full matrix, including every macOS Python version

concurrency:
group: tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read
Expand All @@ -16,6 +25,7 @@ jobs:
# The first two job names are required status checks of the branch ruleset; keep them
# exactly as they are. The others are informational.
name: ${{ matrix.job }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -53,14 +63,6 @@ jobs:
os: windows-latest
python: "3.15"
pytest_args: "-q"
- job: "pytest-extra (macos-latest, python 3.11)"
os: macos-latest
python: "3.11"
pytest_args: "-n auto -q"
- job: "pytest-extra (macos-latest, python 3.15)"
os: macos-latest
python: "3.15"
pytest_args: "-n auto -q"
- job: "pytest-extra (ubuntu-latest, python 3.13)"
os: ubuntu-latest
python: "3.13"
Expand Down Expand Up @@ -100,10 +102,30 @@ jobs:
if: steps.pytest.outcome == 'failure'
run: exit 1

pytest-macos-weekly:
# The macOS runners are the scarce ones: a pull request runs one macOS Python version (pytest-extra, python 3.12 above)
# and the core coverage job; the other macOS versions run here, in the weekly scheduled run or on demand.
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
name: pytest-extra (macos-latest, python ${{ matrix.python }})
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python: ["3.11", "3.15"]
runs-on: macos-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
- run: uv sync --extra dev --python ${{ matrix.python }}
- run: uv run protocolith doctor
- run: uv run protocolith validate-all
- run: uv run --extra dev pytest -n auto -q

core-coverage:
# The core is held at 100% line and branch coverage on every platform; the other platform's lock module is
# excluded by its own pragma.
name: core coverage (${{ matrix.os }})
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand Down
Loading