Skip to content

Commit 4f554ad

Browse files
Technologicatclaude
andcommitted
ci: expand test matrix to macOS and Windows
unpythonic is pure Python but exercises unusual control-flow machinery (continuations, dynvars, TCO, generator tricks), where OS-specific regressions can surface independently of the Python minor version. Matrix shape: full Python 3.10–3.14 plus pypy-3.11 on Linux (where most contributors develop); newest CPython (3.14) plus pypy-3.11 on macOS and Windows. PyPy is included on every OS because it's a separate interpreter family — the control-flow code paths differ from CPython and can have their own quirks. To make the workflow cross-platform: - Add a job-level `shell: bash` default so the `tr` used in "Determine Python version string for PDM" works on Windows (uses Git Bash). - Replace the `pdm use --venv in-project && source .venv/bin/activate && python runtests.py` activation dance in the test step with `pdm run python runtests.py`. `source .venv/bin/activate` hard- codes the POSIX venv layout and would fail on Windows (where the activate script lives at .venv/Scripts/activate). `pdm run` abstracts the platform-specific layout and uses the same venv that the earlier `pdm install` step created — matching the convention already documented in CLAUDE.md. Also add `fail-fast: false` so a failure in one cell doesn't cancel the others: the diagnostic value of seeing which (Python × OS) combinations regress outweighs the minute savings from aborting early, especially with a matrix this small. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3f663a1 commit 4f554ad

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,31 @@ jobs:
3333

3434
test:
3535
needs: lint
36-
runs-on: ubuntu-latest
36+
runs-on: ${{ matrix.os }}
37+
defaults:
38+
run:
39+
shell: bash # so the `tr` in "Determine Python version string for PDM" works on Windows (uses Git Bash)
3740
strategy:
41+
fail-fast: false
3842
matrix:
43+
# Full Python/PyPy matrix on Linux; newest CPython plus PyPy on
44+
# macOS and Windows. Rationale: unpythonic is pure Python but
45+
# exercises unusual control-flow machinery (continuations, dynvars,
46+
# TCO, generator tricks), where OS-specific regressions can surface
47+
# independently of Python minor version. PyPy is included on every
48+
# OS because it's a separate interpreter family — the control-flow
49+
# code paths differ from CPython and can have their own quirks.
50+
os: [ubuntu-latest]
3951
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.11"]
52+
include:
53+
- os: macos-latest
54+
python-version: "3.14"
55+
- os: macos-latest
56+
python-version: "pypy-3.11"
57+
- os: windows-latest
58+
python-version: "3.14"
59+
- os: windows-latest
60+
python-version: "pypy-3.11"
4061

4162
steps:
4263
- uses: actions/checkout@v6
@@ -62,10 +83,7 @@ jobs:
6283
# https://pdm-project.org/en/latest/usage/venv/
6384
pdm install
6485
- name: Test with unpythonic.test.fixtures
65-
run: |
66-
pdm use --venv in-project
67-
source .venv/bin/activate
68-
python runtests.py
86+
run: pdm run python runtests.py
6987

7088
build-dist:
7189
needs: test

0 commit comments

Comments
 (0)