ci: update Actions to supported Node 24 runtimes
This commit is contained in:
@@ -114,6 +114,38 @@ describe("desktop packaging policy", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("workflow action versions", () => {
|
||||
type Step = { uses?: string; with?: Record<string, unknown> };
|
||||
type Workflow = { jobs: Record<string, { steps: Step[] }> };
|
||||
const yaml = require("js-yaml") as { load(source: string): Workflow };
|
||||
|
||||
for (const filename of ["ci.yml", "release.yml"]) {
|
||||
it(`${filename} uses supported Action runtimes without changing the app's Node 26`, () => {
|
||||
const workflow = yaml.load(readFileSync(new URL(`../.github/workflows/${filename}`, import.meta.url), "utf8"));
|
||||
const expected = ["actions/checkout@v7", "actions/setup-node@v7"];
|
||||
if (filename === "release.yml") {
|
||||
expected.push("actions/github-script@v9", "actions/upload-artifact@v7", "maxim-lobanov/setup-xcode@v1");
|
||||
}
|
||||
const observed = new Set<string>();
|
||||
for (const job of Object.values(workflow.jobs)) {
|
||||
for (const step of job.steps) {
|
||||
if (!step.uses) continue;
|
||||
assert.ok(expected.includes(step.uses), `unexpected Action reference: ${step.uses}`);
|
||||
observed.add(step.uses);
|
||||
if (step.uses === "actions/setup-node@v7") {
|
||||
assert.equal(step.with?.["node-version"], "26");
|
||||
assert.equal(step.with?.cache, "npm");
|
||||
}
|
||||
if (step.uses === "actions/upload-artifact@v7") {
|
||||
assert.equal(step.with?.archive ?? true, true, "multi-file installers remain zipped artifacts");
|
||||
}
|
||||
}
|
||||
}
|
||||
assert.deepEqual([...observed].sort(), expected.sort());
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
describe("desktop release workflow", () => {
|
||||
type Step = {
|
||||
if?: string; run?: string; uses?: string; env?: Record<string, string>;
|
||||
|
||||
Reference in New Issue
Block a user