Skip to content

docs: the tasks draft is now RFC 10051 #49

docs: the tasks draft is now RFC 10051

docs: the tasks draft is now RFC 10051 #49

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
workflow_call:
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint and type check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
# The dev extra holds the one ruff and mypy pin, shared with make dev
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Lint code
run: ruff check .
- name: Check code format
run: ruff format --check .
- name: Type check
run: mypy
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Run tests
run: pytest
suite-coverage:
name: Branch coverage of the conformance suite
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
- name: Install dependencies
run: pip install -e ".[dev]"
# A branch of a capability-aware test that no memory profile reaches
# tests nothing; the profiles in tests/_async/test_memory_conformance.py
# are there to reach them.
- name: Measure
run: |
coverage run --branch --source=calendaring -m pytest -q tests/_async/test_memory_conformance.py
coverage report -m --include='*/_async/conformance.py' --fail-under=95