52 - Add dev-e2e and dev-check shell helpers

This commit is contained in:
myrmidex 2026-06-28 18:04:19 +02:00
parent a71276cb16
commit 314a977ced

View file

@ -155,6 +155,44 @@ pkgs.mkShell {
$COMPOSE exec frontend npm run build "$@"
}
dev-e2e() {
# Run the Playwright e2e smoke suite in the `playwright` compose service
# (browsers preinstalled). Needs the stack up (dev-up). NOT the Vitest
# suite — that's dev-fe-test. Pass-through args, e.g.: dev-e2e --headed
PODMAN_USERNS=keep-id $COMPOSE --profile e2e run --rm playwright npm test -- "$@"
}
dev-check() {
# Fast pre-commit gate: all static/unit checks, back + front. Fail-fast
# (stops at the first failure). No coverage, no e2e — use dev-check-all
# for the thorough version.
echo " backend: tests" && dev-test \
&& echo " backend: phpstan" && dev-stan \
&& echo " backend: cs" && dev-cs \
&& echo " frontend: tests" && dev-fe-test \
&& echo " frontend: lint" && dev-fe-lint \
&& echo " frontend: cs" && dev-fe-cs \
&& echo " frontend: build" && dev-fe-build \
&& echo " dev-check passed"
}
dev-check-all() {
# Thorough gate: everything in dev-check, but with COVERAGE instead of the
# plain test runs, plus the Playwright e2e. Slow; needs the stack up.
# NOTE: frontend coverage (dev-fe-coverage) is not wired yet — added in #62
# alongside the @vitest/coverage-v8 setup; until then this runs the plain
# frontend test suite for the frontend leg.
echo " backend: coverage" && dev-coverage \
&& echo " backend: phpstan" && dev-stan \
&& echo " backend: cs" && dev-cs \
&& echo " frontend: tests (coverage pending #62)" && dev-fe-test \
&& echo " frontend: lint" && dev-fe-lint \
&& echo " frontend: cs" && dev-fe-cs \
&& echo " frontend: build" && dev-fe-build \
&& echo " e2e" && dev-e2e \
&& echo " dev-check-all passed"
}
# ===================
# DATABASE / MIGRATION COMMANDS
# ===================
@ -253,6 +291,9 @@ pkgs.mkShell {
echo " dev-fe-cs [args] Check frontend formatting (Prettier)"
echo " dev-fe-cs-fix Apply frontend formatting"
echo " dev-fe-build Build the frontend (tsc + vite build)"
echo " dev-e2e [args] Run Playwright e2e smoke suite (container)"
echo " dev-check Fast gate: all back+front tests/stan/cs/build"
echo " dev-check-all Thorough gate: dev-check + coverage + e2e"
echo " dev-migrate-diff Generate a migration from entity mappings"
echo " dev-migrate Apply migrations to dev + test DBs"
echo " dev-migrate-prev Roll back one migration on dev + test DBs"