Backend test hardening + quality enforcement (#872)

- Reworked many tests
- Enforcing lint + type checking for test suite
- Fixed various issues surfaced by the new tests
- CI tweaks
This commit is contained in:
Alex
2026-04-12 12:01:52 +01:00
committed by GitHub
parent 41c4aa1d72
commit d7b9f2e67f
100 changed files with 8607 additions and 6347 deletions
+53 -9
View File
@@ -8,7 +8,8 @@ permissions:
contents: read
jobs:
backend-tests:
backend-quality:
name: Backend Quality
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -22,22 +23,65 @@ jobs:
enable-cache: true
- name: Sync dependencies
run: uv sync --locked --extra browser
run: make install-python-dev
- name: Lint backend
run: uv run ruff check shelfmark
run: make python-lint
- name: Check backend formatting
run: uv run ruff format --check shelfmark
- name: Typecheck backend
run: uv run basedpyright
run: make python-format-check
- name: Check backend dead code
run: uv run vulture shelfmark
run: make python-dead-code
- name: Lint tests
run: make python-test-lint
- name: Check test formatting
run: make python-test-format-check
backend-typechecks:
name: Backend Typechecks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv and Python
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
python-version: "3.14"
enable-cache: true
- name: Sync dependencies
run: make install-python-dev
- name: Typecheck backend
run: make python-typecheck
- name: Typecheck tests
run: make python-test-typecheck
backend-tests:
name: 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.11.3"
python-version: "3.14"
enable-cache: true
- name: Sync dependencies
run: make install-python-dev
- name: Run tests
run: uv run pytest tests/ -x --tb=short
run: uv run pytest tests/ -x --tb=short -m "not integration and not e2e"
docker-build-check:
runs-on: ubuntu-latest