Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

973 B
Raw Blame
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
import { parse } from "yaml";

const workflow = parse(
  readFileSync(new URL("../../../.github/workflows/ci.yml", import.meta.url), "utf8")
);

test("shards and the final coverage report merge incrementally without dropping the gate", () => {
  const runs: string[] = Object.values(workflow.jobs).flatMap(
    (job: { steps?: { run?: string }[] }) =>
      (job.steps || [])
        .map((step) => step.run || "")
        .filter((run) => /npx c8(?: report)?\s/.test(run))
  );
  assert.equal(runs.length, 2);
  for (const run of runs) assert.match(run, /--merge-async\b/);
  assert.ok(runs.some((run) => run.includes("npm run test:unit:ci:shard")));
  const aggregate = runs.find((run) => run.includes("npx c8 report"));
  assert.match(aggregate, /--check-coverage\b/);
  assert.match(aggregate, /--statements 60 --lines 60 --functions 60 --branches 60/);
});