Skip to content

Remove nominal typing via abc.ABC #195

Remove nominal typing via abc.ABC

Remove nominal typing via abc.ABC #195

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
pre-commit:
name: "pre-commit"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: "Install pre-commit"
run: python -m pip install pre-commit
- name: "Cache pre-commit"
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: "Run pre-commit"
run: |
echo '```console' > "$GITHUB_STEP_SUMMARY"
# Enable colour output for pre-commit and remove it for the summary.
pre-commit run --all-files --show-diff-on-failure --color=always | \
tee >(sed -E 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[mGK]//g' >> "$GITHUB_STEP_SUMMARY") >&1
exit_code="${PIPESTATUS[0]}"
echo '```' >> "$GITHUB_STEP_SUMMARY"
exit "$exit_code"
mypy:
name: "mypy"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: checkout the repository
uses: actions/checkout@v4
- name: install the latest version of uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: test
run: uv run --frozen mypy src tests
pytest:
name: "pytest"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: checkout the repository
uses: actions/checkout@v4
- name: install the latest version of uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: test
run: uv run --frozen pytest