Skip to content

Defer asyncio and typing_extensions imports (lazy package init) #12

Defer asyncio and typing_extensions imports (lazy package init)

Defer asyncio and typing_extensions imports (lazy package init) #12

Workflow file for this run

name: CI
on:
push:
branches: [develop, master, main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.10', 'pypy3.11']
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
# tox-gh-actions maps the running interpreter to the matching env via the
# [gh-actions] table in tox.ini (PyPy keyed as `pypy-3.10` / `pypy-3.11`).
# COVERAGE_FILE gives each cell a unique data file for the combine job.
- run: uvx --with tox-uv --with tox-gh-actions tox
env:
COVERAGE_FILE: .coverage.${{ matrix.python-version }}
- uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: .coverage.*
include-hidden-files: true
if-no-files-found: error
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: uvx --with tox-uv tox -e lint
type-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
checker: [mypy, pyright, pyrefly]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: uvx --with tox-uv tox -e ${{ matrix.checker }}
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: uvx --with tox-uv tox -e codespell
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: uvx --with tox-uv tox -e docs
coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- uses: actions/download-artifact@v4
with:
pattern: coverage-*
merge-multiple: true
- run: uv run coverage combine
- run: uv run coverage report --show-missing --fail-under=100