Skip to content

chore: pin checkout, stop persisting credentials and cover main.py fully #101

chore: pin checkout, stop persisting credentials and cover main.py fully

chore: pin checkout, stop persisting credentials and cover main.py fully #101

Workflow file for this run

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
with:
# Nothing after checkout needs authenticated git.
persist-credentials: false
- 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