Set up browser-based end-to-end testing using pytest-playwright: - Add playwright-driver and pytest-playwright to nix flake - Configure PLAYWRIGHT_BROWSERS_PATH for NixOS compatibility - Create ServerHarness to manage live server for tests - Add smoke tests for health endpoint and page loading - Exclude e2e tests from pre-commit hook (require special setup) Run e2e tests with: pytest tests/e2e/ -v -n 0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16 lines
406 B
YAML
16 lines
406 B
YAML
# ABOUTME: Git hooks configuration using lefthook.
|
|
# ABOUTME: Runs ruff linting/formatting and pytest before commits.
|
|
|
|
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
ruff-check:
|
|
glob: "**/*.py"
|
|
run: ruff check src/ tests/
|
|
ruff-format:
|
|
glob: "**/*.py"
|
|
run: ruff format --check src/ tests/
|
|
pytest:
|
|
glob: "**/*.py"
|
|
run: pytest tests/ --ignore=tests/e2e -q --tb=short
|