Skip to content

Issue #4: [Bug] CI pipeline silently swallows test failures — broken builds pass as green #4

Description

@GoodnessJohn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions