Skip to content

fix: move wsgiref import to a type-checking block #27

fix: move wsgiref import to a type-checking block

fix: move wsgiref import to a type-checking block #27

Workflow file for this run

name: Tests And Linting
on:
pull_request:
merge_group:
push:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Pre-Commit
run: python -m pip install pre-commit
- name: Load cached Pre-Commit Dependencies
id: cached-pre-commit-dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Execute Pre-Commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
allow-prereleases: true
- uses: pdm-project/setup-pdm@v4
name: Set up PDM
with:
python-version: "3.12"
allow-python-prereleases: false
cache: true
cache-dependency-path: |
./pdm.lock
- name: Install dependencies
run: pdm install -G:all
- name: Run mypy
run: pdm run mypy
pyright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
allow-prereleases: true
- uses: pdm-project/setup-pdm@v4
name: Set up PDM
with:
python-version: "3.12"
allow-python-prereleases: false
cache: true
cache-dependency-path: |
./pdm.lock
- name: Install dependencies
run: pdm install -G:all
- name: Run pyright
run: pdm run pyright
test:
name: "test (${{ matrix.python-version }})"
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
uses: ./.github/workflows/test.yml
with:
coverage: ${{ (matrix.python-version == '3.12') }}
python-version: ${{ matrix.python-version }}
test-platform-compat:
if: github.event_name == 'push'
strategy:
fail-fast: false
matrix:
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
uses: ./.github/workflows/test.yml
with:
python-version: "3.12"
os: ${{ matrix.os }}
timeout: 30