Skip to content

CI never runs the test suite #24

Description

@royalpinto007

Desired outcome

.github/workflows/ci.yml runs the Vitest suite on every push and pull request, and a failing test blocks the merge.

Why it matters

The repo has real tests (lib/utils/urls.test.ts, lib/utils/pii.test.ts, app/api/posts/route.test.ts, app/api/admin/posts/route.test.ts, app/api/posts/edit/[token]/route.test.ts, app/api/teams/waitlist/route.test.ts) and a vitest.config.ts, but CI only does type check, lint, format check, and build. Nothing in CI ever executes them, so a PR can break every test and still go green.

Steps

  1. In package.json, add a non-watch script, for example "test:ci": "vitest run". The current "test": "vitest" starts watch mode and would hang a CI runner.
  2. In .github/workflows/ci.yml, add a test job (or a step in lint-and-typecheck) that runs npm ci then npm run test:ci.
  3. Copy the placeholder env block already used by the build job if any test needs IP_HASH_PEPPER or the Supabase vars.

Claiming this

Comment below to claim it. A reply usually comes within a day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions