perfect-postcode/check.sh
2026-07-12 21:31:13 +01:00

45 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"
step() {
printf '\n==> %s\n' "$1"
shift
"$@"
}
step "Python lint: ruff" uv run ruff check .
step "Python dependency lint: deptry" uv run deptry .
step "Python unit tests" uv run pytest pipeline
(
cd "$ROOT_DIR/finder"
# finder is a separate uv project (the scraper) with its own venv, so the
# root `pytest pipeline` run above never reaches it. pytest is not a declared
# finder dependency, so pull it in ephemerally as its README documents.
step "Finder (scraper) unit tests" uv run --with pytest pytest -q
)
(
cd "$ROOT_DIR/frontend"
step "Frontend lint: ESLint" npm run lint
step "Frontend format check: Prettier" npm run format:check
step "Frontend typecheck: TypeScript" npm run typecheck
step "Frontend i18n completeness" npm run check:i18n
step "Frontend unit tests: Vitest" npm run test
)
(
cd "$ROOT_DIR/screenshot"
step "Screenshot service unit tests" npm run test
)
(
cd "$ROOT_DIR/server-rs"
step "Rust lint: clippy" cargo clippy --all-targets -- -D warnings
step "Rust format check" cargo fmt --all --check
step "Rust dependency lint: cargo machete" cargo machete
step "Rust unit tests" cargo test
)