源码快照 @ 2026-09-02 (source-only, 剔除非源码素材)
This commit is contained in:
commit
04bac1f6e2
2200 files changed
+489415
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { expect } from "vitest";
|
||||
import { test } from "@openwork/testkit";
|
||||
|
||||
const workflowPath = fileURLToPath(
|
||||
new URL("../../.github/workflows/nightly-flake-report.yml", import.meta.url),
|
||||
);
|
||||
|
||||
test("the nightly flake report installs Bun before running the PR lane", async ({ evidence }) => {
|
||||
const workflow = await readFile(workflowPath, "utf8");
|
||||
const setupBun = workflow.indexOf("- name: Setup Bun");
|
||||
const installDependencies = workflow.indexOf("- name: Install dependencies");
|
||||
const collectRuns = workflow.indexOf("- name: Collect pr-lane runs");
|
||||
|
||||
expect(setupBun).toBeGreaterThan(-1);
|
||||
expect(workflow).toContain(
|
||||
"uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2",
|
||||
);
|
||||
expect(workflow).toContain("bun-version: 1.3.14");
|
||||
expect(setupBun).toBeLessThan(installDependencies);
|
||||
expect(installDependencies).toBeLessThan(collectRuns);
|
||||
|
||||
evidence.recordAssertionEvidence(
|
||||
"Nightly PR-lane reliability runs have their required Bun runtime",
|
||||
"The workflow installs pinned Bun 1.3.14 before dependencies and before collecting any PR-lane run, preventing Bun-backed specs from being misreported as unreliable when the executable is absent.",
|
||||
true,
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user