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

permissions:
contents: read

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
strategy:
fail-fast: false
matrix:
# The floor and the newest. 3.10 is the real floor: main.py annotates
# with `str | None` and has no `from __future__ import annotations`, so
# the annotation is evaluated at def time, and main_test.py uses
# parenthesized context managers. Both are 3.10+.
#
# The action itself runs on whatever python3 the runner ships, so the
# in-between versions add little here — unlike commit-check, which is a
# published package and tests every one.
py: ['3.10', '3.14']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.py }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# requirements.txt rather than a bare install: it pins the same
# commit-check the action ships, which is the version the golden
# tests expect to read back out of importlib.metadata.
python -m pip install -r requirements.txt pytest

- name: Run unit tests
run: python -m pytest main_test.py -v