Skip to content

Bump CI actions off the deprecated Node 20 runtime #167

Bump CI actions off the deprecated Node 20 runtime

Bump CI actions off the deprecated Node 20 runtime #167

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
# Never cancel a main run: back-to-back merges would leave the earlier
# commit with no completed check.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
# actions/checkout v5.1.0
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
persist-credentials: false
# actions/setup-python v6.3.0
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- run: pip install -e '.[dev]'
- run: ruff check .
- run: ruff format --check .
- run: mypy
# actionlint auto-discovers .github/actionlint.yaml.
# rhysd/actionlint v1.7.12
- name: Lint workflow files
uses: rhysd/actionlint@914e7df21a07ef503a81201c76d2b11c789d3fca
test:
strategy:
matrix:
python-version: ["3.10", "3.14"]
runs-on: ubuntu-latest
steps:
# actions/checkout v5.1.0
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
persist-credentials: false
# actions/setup-python v6.3.0
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- run: pip install -e '.[dev]'
- run: pytest -q -n auto
coverage:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
# actions/checkout v5.1.0
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
persist-credentials: false
fetch-depth: 0
# actions/setup-python v6.3.0
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- run: pip install -e '.[dev]'
- run: coverage run --source=src -m pytest -q
- run: coverage report
- run: coverage xml
- run: >-
diff-cover coverage.xml --compare-branch=origin/main --fail-under=85