perf: speed up local test runs by moving coverage to optional script
CI / check (push) Successful in 1m0s
CI / deploy (push) Successful in 1m8s

Run vitest without coverage by default (pnpm test) and add pnpm test:coverage which enforces the coverage thresholds. CI keeps using the coverage run so thresholds are still enforced on every push.
This commit is contained in:
openhands committed 2026-09-08 18:12:34 +02:00
1 parent ecadef904d
commit 54b7c67878
5 files changed
+7 -6

No files matched your search

+1 -1
View File
@@ -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", () => {
+1 -1
View File
@@ -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(