Files
Dash dde49cf2dd build: run hooks and tests in GitHub Actions
The lint job runs the prek hooks (ruff and ty) on all files. The test
job runs pytest on Python 3.10 to 3.14 with node available, after
fetching the web version's code for the upstream comparison; the
download is cached, and if it fails those tests skip themselves.
2026-10-17 19:16:02 +02:00

39 lines
990 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: uv sync
- run: uv run prek run --all-files --show-diff-on-failure
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/cache@v4
with:
path: ~/.cache/pqcli/pq-web
key: pq-web-${{ hashFiles('tests/upstream/fetch.py') }}
# The upstream comparison tests skip themselves if this fails, for
# example while progressquest.com is down.
- run: uv run python tests/upstream/fetch.py || true
- run: uv run pytest -q