Files
shelfmark/.github/workflows/ci.yml
T
Alex 3a3a3ce449 Add new python tooling + apply ruff linter cleanup (#845)
- Adds `uv`, `ruff`, `pyright`, `vulture` and `pytest-xdist`
- Move project, lockfile, docker build etc to uv
- Align python tooling on 3.14
- Huge bulk of ruff linter fixes applied. Still in progress but all the
core types are now enforced
- Update CI and test helpers
2026-04-10 13:03:25 +01:00

60 lines
1.4 KiB
YAML

name: CI
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
backend-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv and Python
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
with:
version: "0.11.3"
python-version: "3.14"
enable-cache: true
- name: Sync dependencies
run: uv sync --locked --extra browser
- name: Lint backend
run: uv run ruff check shelfmark
- name: Check backend formatting
run: uv run ruff format --check shelfmark
- name: Run tests
run: uv run pytest tests/ -x --tb=short
frontend-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 20
cache: "npm"
cache-dependency-path: src/frontend/package-lock.json
- name: Install dependencies
working-directory: src/frontend
run: npm ci
- name: Typecheck
working-directory: src/frontend
run: npm run typecheck
- name: Unit tests
working-directory: src/frontend
run: npm run test:unit