Skip to content

Merge pull request #236 from dfns/ci/python-enable-checks #3

Merge pull request #236 from dfns/ci/python-enable-checks

Merge pull request #236 from dfns/ci/python-enable-checks #3

Workflow file for this run

name: Build
on:
pull_request:
push:
branches: [main]
# Least-privilege default token (GitHub's implicit default is not safe to rely on).
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Lint, type-check & test (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Matches requires-python (>=3.10) and the supported-version classifiers.
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.0.3
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install (with dev extras)
run: python3 -m pip install -e ".[dev]"
- name: Lint (ruff)
run: ruff check .
- name: Type-check (mypy --strict)
run: mypy dfns_sdk
- name: Test (pytest)
run: pytest