chore: sync infra docs and coverage
This commit is contained in:
@@ -1,23 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
COMPOSE_FILE="${COMPOSE_FILE:-docker-compose.test.yml}"
|
||||
echo ">>> Running backend lint locally"
|
||||
(cd backend && npm run lint)
|
||||
|
||||
cleanup() {
|
||||
docker compose -f "${COMPOSE_FILE}" down -v >/dev/null 2>&1 || true
|
||||
}
|
||||
echo ">>> Running frontend lint locally"
|
||||
(cd frontend && npm run lint)
|
||||
|
||||
cleanup
|
||||
trap cleanup EXIT
|
||||
echo ">>> Running backend test suite"
|
||||
(cd backend && npm test -- --runInBand --coverage)
|
||||
|
||||
run_stage() {
|
||||
local service="$1"
|
||||
echo ">>> Running ${service} tests inside container"
|
||||
docker compose -f "${COMPOSE_FILE}" build "${service}"
|
||||
docker compose -f "${COMPOSE_FILE}" run --rm "${service}"
|
||||
}
|
||||
echo ">>> Running frontend test suite"
|
||||
(cd frontend && npm test -- --watchAll=false --coverage)
|
||||
|
||||
run_stage backend-tester
|
||||
run_stage frontend-tester
|
||||
|
||||
echo "All CI test stages completed successfully (containers only)."
|
||||
echo "All CI test stages completed successfully."
|
||||
|
||||
Reference in New Issue
Block a user