diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 7af40b5d6f..f363a383ea 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -53,9 +53,9 @@ jobs: BCRYPT_ROUNDS: 4 run: | if [ -x /usr/bin/time ]; then - /usr/bin/time -f 'Tests: %e seconds; peak process RSS: %M KiB' pnpm test --maxWorkers=2 + /usr/bin/time -f 'Tests: %e seconds; peak process RSS: %i KiB' pnpm test:coverage --maxWorkers=2 else - time pnpm test --maxWorkers=2 + time pnpm test:coverage --maxWorkers=2 fi # ───────────────────────────────────────────── diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index e35cbcf77b..771d95e600 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -18,7 +18,7 @@ jobs: pnpm install --frozen-lockfile pnpm typecheck pnpm biome:lint - pnpm test + pnpm test:coverage env: SKIP_ENV_VALIDATION: 1 NODE_ENV: test diff --git a/package.json b/package.json index ed918b4e2f..5515aea6fc 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "format": "biome format --write .", "diag:permissions": "tsx scripts/diagnose-permission-page.ts", "jobs:worker": "node --conditions=react-server --import tsx scripts/jobs-worker.ts", - "test": "vitest run", + "test": "vitest run --coverage.enabled=false", + "test:coverage": "vitest run", "typecheck": "tsc --noEmit", "db:generate": "drizzle-kit generate", "db:introspect": "drizzle-kit introspect", diff --git a/src/lib/ci-workflow-contract.test.ts b/src/lib/ci-workflow-contract.test.ts index 750cfb3951..bd6b6c40be 100644 --- a/src/lib/ci-workflow-contract.test.ts +++ b/src/lib/ci-workflow-contract.test.ts @@ -25,7 +25,7 @@ describe("CI workflow", () => { it("check runs lint, typecheck, and test", () => { expect(workflow).toContain("pnpm biome:lint"); expect(workflow).toContain("pnpm typecheck"); - expect(workflow).toContain("pnpm test"); + expect(workflow).toContain("pnpm test:coverage"); }); it("check job runs on self-hosted runner", () => { diff --git a/src/lib/deploy-workflow-contract.test.ts b/src/lib/deploy-workflow-contract.test.ts index cf76594d5e..2fbba0e9ba 100644 --- a/src/lib/deploy-workflow-contract.test.ts +++ b/src/lib/deploy-workflow-contract.test.ts @@ -4,7 +4,7 @@ import { expect, it } from "vitest"; const workflow = readFileSync(".gitea/workflows/ci.yaml", "utf8"); const deploy = readFileSync("scripts/ci-deploy.sh", "utf8"); it("uses two test workers and runs smoke checks in the deployment transaction", () => { - expect(workflow).toContain("pnpm test --maxWorkers=2"); + expect(workflow).toContain("pnpm test:coverage --maxWorkers=2"); expect(workflow).not.toContain("\n e2e:"); expect(workflow).toContain("bash scripts/ci-deploy.sh"); expect(deploy).toContain(