Skip to content

CI runs only Playwright e2e: unit tests, lint, and typecheck never run in CI #394

Description

@usmanimamu17-create

Problem

.github/workflows/e2e-tests.yml is the only PR/push workflow, and it runs a single job: npm ci, npx playwright install, npm run test:e2e. The unit suite (vitest, ~20 test files in tests/ and src/), ESLint, and any typecheck never execute in CI. Consequences:

  • Red code merges silently: a failing unit test, a lint error, or a type error in an unused module does not block a PR — the e2e suite (which currently exercises only a few journeys) can pass while the unit suite is red.
  • The repo's own gates are unenforced: the project ships npm run lint and npm test scripts; nothing runs them automatically, so their value depends on every contributor remembering.
  • The companion infra issues (typecheck script, codegen verification) have no home: any "add X to CI" work is unmoored until the CI pipeline is the place where checks run.

Root cause

The CI workflow was added for e2e coverage only (the unit/lint steps either were never added or were removed with the backend CI cleanup).

Why this is architecturally hard

  1. Adding unit + lint + typecheck jobs is straightforward, but the ordering and caching matter: npm ci is shared, Playwright browsers are a heavy install that should not run on every job, and vitest/next build can conflict on cache dirs.
  2. The e2e workflow currently assumes a running app+backend (the specs hit real routes); a unit/lint job must NOT depend on the backend, so the workflow needs job separation (unit first, e2e after).
  3. Deciding the merge gate (required checks) is a repo-administration step; the workflow must be the artifact that makes it possible.

Proposed design

Add unit-test, lint, and typecheck jobs (or steps) to .github/workflows/e2e-tests.yml (or a new ci.yml), run them on every PR and push to main, and document the required-check expectations. Verify the jobs pass on the current tree.

Acceptance criteria

Service

  • PRs run unit tests, lint, and typecheck in CI.
  • The e2e job runs only after (or independently of) the fast checks.

Tests

  • The new workflow file is valid and the fast jobs pass locally.
  • A deliberately failing unit test would fail CI (verified once).

Out of scope

OpenAPI codegen verification (open issue #272) and the backend CI.

Getting started

npm test && npm run lint && npx tsc --noEmit

Good first files to read: .github/workflows/e2e-tests.yml, package.json.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardStellar Waveissue-trackingThird CampaignCampaign: Third Campaignarea/infraImported campaign issue labelpriority/highImported campaign issue label

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions