Description:
The CI workflow uses || echo "..." to suppress test runner exit codes:
❌ .github/workflows/ci.yml
- name: Component tests
run: npx vitest run --config vitest.config.ts || echo "Vitest not configured, skipping"
- name: E2E tests
run: npx playwright test || echo "No e2e to run"
If tests fail (not just "not found"), the pipeline still reports success. A broken build can merge undetected.
Fix:
Separate "not configured" from "configured but failing" by checking for the config file's existence first
Use proper conditional steps with if: hashFiles('vitest.config.ts') != ''
Remove the || echo fallback entirely once the test infra is confirmed working
-
name: Component tests
if: hashFiles('vitest.config.ts') != ''
run: npx vitest run --config vitest.config.ts
-
name: E2E tests
if: hashFiles('playwright.config.ts') != ''
run: npx playwright test
Also: rename the package.json name from "nextjs-postgresql-template" to "rentar-pay-backend".
Acceptance criteria:
CI step fails if vitest exits with a non-zero code
CI step fails if playwright exits with a non-zero code
package.json name updated to rentar-pay-backend
CI pipeline runs green only when all configured tests pass
Description:
The CI workflow uses || echo "..." to suppress test runner exit codes:
❌ .github/workflows/ci.yml
run: npx vitest run --config vitest.config.ts || echo "Vitest not configured, skipping"
run: npx playwright test || echo "No e2e to run"
If tests fail (not just "not found"), the pipeline still reports success. A broken build can merge undetected.
Fix:
Separate "not configured" from "configured but failing" by checking for the config file's existence first
Use proper conditional steps with if: hashFiles('vitest.config.ts') != ''
Remove the || echo fallback entirely once the test infra is confirmed working
name: Component tests
if: hashFiles('vitest.config.ts') != ''
run: npx vitest run --config vitest.config.ts
name: E2E tests
if: hashFiles('playwright.config.ts') != ''
run: npx playwright test
Also: rename the package.json name from "nextjs-postgresql-template" to "rentar-pay-backend".
Acceptance criteria:
CI step fails if vitest exits with a non-zero code
CI step fails if playwright exits with a non-zero code
package.json name updated to rentar-pay-backend
CI pipeline runs green only when all configured tests pass