Repository navigation
Expand file tree
/
Copy pathgithub-actions-workflows.test.js
More file actions
424 lines (399 loc) · 20.2 KB
/
Copy pathgithub-actions-workflows.test.js
File metadata and controls
424 lines (399 loc) · 20.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
"use strict";
const assert = require("node:assert/strict");
const { execFileSync } = require("node:child_process");
const fs = require("node:fs");
const path = require("node:path");
const test = require("node:test");
const repoRoot = path.resolve(__dirname, "../..");
function read(relativePath) {
return fs.readFileSync(path.join(repoRoot, relativePath), "utf8");
}
function job(workflow, jobName) {
const lines = workflow.split("\n");
const start = lines.findIndex((line) => line === ` ${jobName}:`);
assert.notEqual(start, -1, `expected ${jobName} job`);
const end = lines.findIndex(
(line, index) => index > start && /^ [a-zA-Z0-9_-]+:$/.test(line),
);
return lines.slice(start, end === -1 ? undefined : end).join("\n");
}
// Every tracked test file, found by name rather than by the runner's glob.
function trackedTestFiles() {
return execFileSync("git", ["ls-files"], { cwd: repoRoot, encoding: "utf8" })
.split("\n")
.filter((file) => /(^|\/)test\.js$|\.test\.js$/.test(file))
.sort();
}
// The files scripts/ci/run-node-checks.sh runs.
function guardedTestFiles() {
const runner = read("scripts/ci/run-node-checks.sh");
const match = runner.match(/git ls-files ((?:'[^']*test\.js' ?)+)\)/);
assert.ok(match, "run-node-checks.sh lists its test files with git ls-files");
const pathspecs = match[1].trim().split(/\s+/).map((spec) => spec.slice(1, -1));
return execFileSync("git", ["ls-files", ...pathspecs], { cwd: repoRoot, encoding: "utf8" })
.split("\n")
.filter(Boolean)
.sort();
}
test("CI runs every Node test through the TMPDIR guard", () => {
const sourceAndNode = job(read(".github/workflows/ci.yml"), "source-and-node");
assert.match(sourceAndNode, /^ run: bash scripts\/ci\/run-node-checks\.sh all$/m);
assert.doesNotMatch(sourceAndNode, /node --test/);
assert.deepEqual(guardedTestFiles(), trackedTestFiles());
});
test("CI runs the complete workflow regression suite", () => {
const workflow = read(".github/workflows/ci.yml");
assert.ok(guardedTestFiles().includes("scripts/ci/github-actions-workflows.test.js"));
const nixBuild = job(workflow, "nix-build");
assert.match(nixBuild, /system: x86_64-linux/);
assert.match(nixBuild, /system: aarch64-linux/);
assert.match(nixBuild, /runner: ubuntu-24\.04-arm/);
assert.match(nixBuild, /checks\.\$\{\{ matrix\.system \}\}\.modules/);
assert.match(nixBuild, /nix-runtime-chronicle-skysight/);
assert.match(nixBuild, /nix-runtime-computer-use/);
assert.match(nixBuild, /nix-runtime-maximal-directory-watch/);
assert.match(nixBuild, /nix-runtime-maximal-shallow-watch/);
assert.match(nixBuild, /nix-installer/);
const rust = job(workflow, "rust");
assert.match(rust, /cargo test -p codex-record-replay-linux/);
assert.match(rust, /cargo clippy -p codex-record-replay-linux --all-targets -- -D warnings/);
const nixVm = job(workflow, "nix-vm");
assert.match(nixVm, /checks\.x86_64-linux\.nixos-vm/);
const nixGate = job(workflow, "nix");
assert.match(nixGate, /if: \$\{\{ always\(\) \}\}/);
assert.match(nixGate, /test "\$NIX_BUILD_RESULT" = success/);
assert.match(nixGate, /test "\$NIX_VM_RESULT" = success/);
});
test("normal CI and container smoke run local package verification policy regressions", () => {
const suite = "scripts/lib/install-verification.test.js";
// CI runs it through the guarded runner (checked above), smoke directly.
assert.ok(guardedTestFiles().includes(suite), `run-node-checks.sh must execute ${suite}`);
const commands = read("tests/scripts_smoke.sh").replace(/\\\r?\n/g, " ").split("\n").map(line => line.trim());
assert.ok(commands.some(line => line.startsWith("node --test ") && line.split(/\s+/).includes(suite)),
`the container smoke entrypoint must execute ${suite}`);
const core = read("scripts/ci/container-entrypoint.sh").split("run_core() {", 2)[1].split("\n}", 1)[0];
assert.match(core, /bash tests\/scripts_smoke\.sh/);
});
test("official Linux validation runs fully on every pull request but not hourly", () => {
const workflow = read(".github/workflows/upstream-build-app.yml");
assert.doesNotMatch(workflow, /^ schedule:/m);
assert.match(workflow, /^ pull_request:\s*\n push:/m);
assert.match(workflow, /^ - \.github\/workflows\/upstream-build-app\.yml$/m);
const signedBaseline = job(workflow, "signed-baseline");
assert.match(signedBaseline, /architecture: \[amd64, arm64\]/);
assert.match(signedBaseline, /name: Build required default baseline/);
assert.match(signedBaseline, /report\.enabledFeatures\.length !== 0/);
assert.match(signedBaseline, /requiredPatchNamesForProfile\("upstream-build"\)/);
assert.match(signedBaseline, /report\.patches\.length !== required\.size/);
assert.match(signedBaseline, /!required\.has\(patch\.name\)/);
assert.match(signedBaseline, /patch\.ciPolicy !== "required-upstream"/);
assert.match(signedBaseline, /patch\.sourceKind !== "core"/);
assert.match(signedBaseline, /patch\.status !== "applied"/);
assert.match(signedBaseline, /preservedByteForByte !== \(required\.size === 0\)/);
assert.match(signedBaseline, /report\.upstreamAppAsar\?\.sha256 !== upstreamSha256/);
assert.match(signedBaseline, /report\.outputAppAsar\?\.sha256 !== outputSha256/);
assert.match(signedBaseline, /required\.size === 0/);
assert.match(signedBaseline, /unexpected required default patch report/);
assert.doesNotMatch(signedBaseline, /quit-confirmation-focus/);
assert.match(signedBaseline, /validate-patch-report\.js/);
assert.match(signedBaseline, /--profile upstream-build/);
assert.match(signedBaseline, /name: Test required core patches against the signed bundle/);
assert.match(
signedBaseline,
/dpkg-deb --fsys-tarfile "\$package" \| \\\s+tar -xf - -C "\$asar_dir" --strip-components=4 \\\s+\.\/usr\/lib\/chatgpt\/ChatGPT \\\s+\.\/usr\/lib\/chatgpt\/resources\/app\.asar \\\s+\.\/usr\/lib\/chatgpt\/resources\/app\.asar\.unpacked/,
);
assert.match(signedBaseline, /asar="\$asar_dir\/resources\/app\.asar"/);
assert.match(signedBaseline, /test -x "\$asar_dir\/ChatGPT"/);
assert.match(signedBaseline, /test -s "\$asar"/);
assert.match(signedBaseline, /test -d "\$asar\.unpacked"/);
assert.match(signedBaseline, /echo "asar=\$asar" >> "\$GITHUB_OUTPUT"/);
assert.match(signedBaseline, /echo "app_dir=\$asar_dir" >> "\$GITHUB_OUTPUT"/);
assert.match(signedBaseline, /echo "executable=\$asar_dir\/ChatGPT" >> "\$GITHUB_OUTPUT"/);
assert.doesNotMatch(signedBaseline, /dpkg-deb -x/);
assert.equal(
(signedBaseline.match(/trap 'rm -rf "\$(?:extracted_asar|fix_root|runtime_metadata)"' EXIT/g) || []).length,
6,
);
assert.match(signedBaseline, /CODEX_SIGNED_EXTRACTED_APP="\$extracted_asar"/);
assert.match(signedBaseline, /corePatchDescriptors\(\)/);
assert.match(signedBaseline, /ciPolicy \}\) => ciPolicy === "required-upstream"/);
assert.match(signedBaseline, /path\.join\(path\.dirname\(sourcePath\), "test\.js"\)/);
assert.match(signedBaseline, /if \(tests\.length > 0\)/);
assert.doesNotMatch(signedBaseline, /tests\.length === 0 \|\|/);
assert.doesNotMatch(
signedBaseline,
/scripts\/patches\/core\/[^\s"']+\/test\.js/,
);
assert.match(signedBaseline, /name: Require signed renderer dependency regression/);
assert.doesNotMatch(
signedBaseline,
/name: Require signed renderer dependency regression\n\s+if:/,
);
assert.match(signedBaseline, /EXPECTED_SIGNED_VERSION: \$\{\{ inputs\.version \}\}/);
assert.match(
signedBaseline,
/EXPECTED_SIGNED_REPOSITORY_PATH: \$\{\{ matrix\.architecture == 'amd64' && inputs\.amd64_repository_path \|\| inputs\.arm64_repository_path \}\}/,
);
assert.match(
signedBaseline,
/EXPECTED_SIGNED_SHA256: \$\{\{ matrix\.architecture == 'amd64' && inputs\.amd64_sha256 \|\| inputs\.arm64_sha256 \}\}/,
);
assert.match(signedBaseline, /process\.env\.GITHUB_EVENT_NAME === "workflow_dispatch"/);
assert.match(signedBaseline, /signed renderer regression is not bound to the expected campaign/);
assert.match(
signedBaseline,
/"\$\{\{ steps\.upstream\.outputs\.asar \}\}"/,
);
assert.match(signedBaseline, /for \(const directory of \["", "async"\]\)/);
assert.match(signedBaseline, /expected rspack async webview chunks in webview\/assets\/async/);
assert.match(signedBaseline, /statically imports missing/);
assert.match(signedBaseline, /the import scan is stale/);
assert.match(signedBaseline, /webview chunks restored a static import cycle/);
assert.doesNotMatch(signedBaseline, /authed-route|app-primary/);
assert.doesNotMatch(signedBaseline, /\b\d{2}\.\d{3}\.\d{5}\b/);
assert.doesNotMatch(
signedBaseline,
/pool\/main\/c\/chatgpt\/chatgpt_[^\s"']+\.deb/,
);
assert.doesNotMatch(signedBaseline, /\b[0-9a-f]{64}\b/);
assert.match(
signedBaseline,
/verify-official-linux-features\.js \\\s+"\$extracted_asar" \\\s+"\$\{\{ steps\.upstream\.outputs\.app_dir \}\}"/,
);
assert.match(
signedBaseline,
/name: Validate the Nix ELF contract against the official payload[\s\S]*?env:\n CODEX_INSTALL_DIR:.*matrix\.architecture[\s\S]*?nix\/elf-runtime\.cjs fix[\s\S]*?nix\/elf-runtime\.cjs audit/,
);
assert.match(
signedBaseline,
/nix\/elf-runtime\.cjs validate-upstream[\s\S]*?--root "\$CODEX_INSTALL_DIR"[\s\S]*?--arch "\$\{\{ matrix\.architecture \}\}"/,
);
assert.match(
signedBaseline,
/matrix:\n architecture: \[amd64, arm64\][\s\S]*?name: Qualify Watchbound against the signed runtime executable\n run:/,
);
assert.match(
signedBaseline,
/official_asar="\$\(realpath -- "\$\{\{ steps\.upstream\.outputs\.asar \}\}"\)"[\s\S]*?@electron\/asar extract-file \\\s+"\$official_asar" \\\s+package\.json[\s\S]*?test -s "\$runtime_metadata\/package\.json"[\s\S]*?"\$runtime_metadata" \\\s+"\$\{\{ steps\.upstream\.outputs\.executable \}\}" \\\s+"\$\{\{ matrix\.architecture \}\}"/,
);
assert.match(signedBaseline, /validateArtifactManifest\(manifest\)/);
assert.match(
signedBaseline,
/validateTargetRuntime\(\s+process\.argv\[2\],[\s\S]*?process\.argv\[3\],\s+\)/,
);
assert.match(
signedBaseline,
/runtime\.qualification !== "signed-runtime-executable"/,
);
const packageMatrix = job(workflow, "package-matrix");
assert.match(packageMatrix, /architecture: amd64/);
assert.match(packageMatrix, /architecture: arm64/);
assert.match(packageMatrix, /\.\/scripts\/build-deb\.sh/);
assert.match(packageMatrix, /\.\/scripts\/build-rpm\.sh/);
assert.match(packageMatrix, /\.\/scripts\/build-pacman\.sh/);
assert.match(packageMatrix, /\.\/scripts\/build-appimage\.sh/);
const dockFeatureAlone = job(workflow, "dock-icon-feature-alone");
assert.match(
dockFeatureAlone,
/ref: \$\{\{ github\.event_name == 'pull_request' && github\.event\.pull_request\.head\.sha \|\| github\.sha \}\}/,
);
assert.match(dockFeatureAlone, /"enabled": \["ui-tweaks"\]/);
assert.match(dockFeatureAlone, /"dockIcon": \{ "enabled": true \}/);
assert.match(dockFeatureAlone, /EXPECTED_RELEASE_ID: \$\{\{ inputs\.release_id \}\}/);
assert.match(dockFeatureAlone, /EXPECTED_VERSION: \$\{\{ inputs\.version \}\}/);
assert.match(
dockFeatureAlone,
/EXPECTED_REPOSITORY_PATH: \$\{\{ inputs\.amd64_repository_path \}\}/,
);
assert.match(dockFeatureAlone, /EXPECTED_SHA256: \$\{\{ inputs\.amd64_sha256 \}\}/);
assert.match(dockFeatureAlone, /process\.env\.GITHUB_EVENT_NAME === "workflow_dispatch"/);
assert.match(dockFeatureAlone, /metadata\.version !== process\.env\.EXPECTED_VERSION/);
assert.match(
dockFeatureAlone,
/metadata\.repositoryPath !== process\.env\.EXPECTED_REPOSITORY_PATH/,
);
assert.match(dockFeatureAlone, /metadata\.sha256 !== process\.env\.EXPECTED_SHA256/);
assert.match(dockFeatureAlone, /Dock icon package does not match the dispatched campaign/);
assert.match(
dockFeatureAlone,
/--require-applied feature:ui-tweaks:appearance-dock-icon-main-process/,
);
assert.match(
dockFeatureAlone,
/--require-applied feature:ui-tweaks:appearance-dock-icon-settings-row/,
);
assert.match(dockFeatureAlone, /Expected Dock descriptors 2\/2 applied/);
assert.match(dockFeatureAlone, /scripts\/lib\/upstream-linux-package\.js/);
assert.match(
dockFeatureAlone,
/--key-base64 assets\/openai-codex-linux-repository-key\.gpg\.base64/,
);
assert.match(dockFeatureAlone, /\.\/install\.sh "\$package"/);
assert.match(
dockFeatureAlone,
/find "\$payload" -mindepth 1 -maxdepth 1 -printf '%f\\n'/,
);
assert.doesNotMatch(dockFeatureAlone, /find "\$payload"[^\n]+-type f/);
assert.match(dockFeatureAlone, /test ! -L "\$payload\/\$resource"/);
for (const sourceComparison of [
/cmp "\$upstream_root\/usr\/lib\/chatgpt\/resources\/icon-chatgpt\.png" "\$payload\/icon-chatgpt\.png"/,
/cmp assets\/codex-linux\.png "\$payload\/icon-codex-dark-color\.png"/,
/cmp assets\/codex-linux\.png "\$payload\/icon-codex-light\.png"/,
/cmp linux-features\/ui-tweaks\/sync-desktop-icon\.sh "\$payload\/sync-desktop-icon\.sh"/,
/cmp linux-features\/ui-tweaks\/sync-desktop-icon\.sh "\$hook"/,
]) {
assert.match(dockFeatureAlone, sourceComparison);
}
assert.match(dockFeatureAlone, /test -x "\$payload\/sync-desktop-icon\.sh"/);
assert.match(dockFeatureAlone, /ui-tweaks-dock-icon-cleanup\.sh/);
assert.match(dockFeatureAlone, /test -x "\$hook"/);
});
test("install-deps workflow covers apt and pacman Rust bootstrap", () => {
const workflow = read(".github/workflows/install-deps.yml");
assert.match(workflow, /^ - scripts\/lib\/install-deps-rust\.sh$/m);
assert.match(workflow, /^ - tests\/install_deps_pacman_rust_matrix\.sh$/m);
const apt = job(workflow, "apt-node-bootstrap");
for (const image of [
"docker.io/library/ubuntu:22.04",
"docker.io/library/ubuntu:24.04",
"docker.io/library/debian:12",
]) {
assert.match(apt, new RegExp(image.replaceAll(".", "\\.")));
}
const pacman = job(workflow, "pacman-rust-bootstrap");
assert.match(pacman, /docker\.io\/library\/archlinux:latest/);
assert.match(pacman, /CODEX_RUN_ARCH_INSTALL_DEPS_MATRIX: "1"/);
assert.match(pacman, /bash tests\/install_deps_pacman_rust_matrix\.sh/);
for (const rustState of [
"working-distro-cargo",
"rustup-without-toolchain",
"neither-rust-nor-rustup",
"shadowed-user-local-proxy",
]) {
assert.match(pacman, new RegExp(`^ - ${rustState}$`, "m"));
}
});
test("Community profile isolation is validated alone against the signed package", () => {
const workflow = read(".github/workflows/upstream-build-app.yml");
const feature = job(workflow, "community-profile-isolation-feature-alone");
assert.match(
feature,
/ref: \$\{\{ github\.event_name == 'pull_request' && github\.event\.pull_request\.head\.sha \|\| github\.sha \}\}/,
);
assert.match(feature, /"enabled": \["community-profile-isolation"\]/);
assert.match(feature, /scripts\/lib\/upstream-linux-package\.js/);
assert.match(feature, /\.\/install\.sh "\$package"/);
assert.match(
feature,
/node --test linux-features\/community-profile-isolation\/test\.js/,
);
assert.match(feature, /CODEX_ELECTRON_USER_DATA_PATH/);
const signedBaseline = job(workflow, "signed-baseline");
assert.match(
signedBaseline,
/Test profile isolation, Computer Use and account menu against the signed bundle/,
);
assert.match(
signedBaseline,
/CODEX_SIGNED_EXTRACTED_APP="\$extracted_asar"/,
);
assert.match(
signedBaseline,
/node --test linux-features\/community-profile-isolation\/test\.js/,
);
const logicalBaseline = signedBaseline.replace(/\\\r?\n[ \t]*/g, " ");
const signedCommands = logicalBaseline.match(
/CODEX_SIGNED_EXTRACTED_APP="\$extracted_asar"[ \t]+node --test[ \t]+[^\r\n]+/g,
) ?? [];
const computerUseCommand = signedCommands.find((command) =>
command.includes("linux-features/computer-use-linux/unified.test.js"));
assert.ok(computerUseCommand, "Computer Use tests must use the signed extracted app");
const testPaths = computerUseCommand.split("node --test")[1].trim().split(/\s+/);
assert.ok(testPaths.every((value) => /^linux-features\/[\w./-]+\.js$/.test(value)));
for (const file of [
"linux-features/computer-use-linux/unified.test.js",
"linux-features/computer-use-linux/resume.test.js",
"linux-features/computer-use-linux/current-signed.test.js",
"linux-features/computer-use-linux/native-applications.test.js",
"linux-features/account-switcher/test.js",
]) {
assert.ok(testPaths.includes(file), `${file} must run in the signed baseline`);
}
});
test("official Linux metadata expires after seven days", () => {
const workflow = read(".github/workflows/upstream-build-app.yml");
const signedBaseline = job(workflow, "signed-baseline");
assert.match(signedBaseline, /name: official-linux-\$\{\{ matrix\.architecture \}\}-metadata/);
assert.match(signedBaseline, /retention-days: 7/);
});
test("official Linux gate fails closed unless every dependency succeeds", () => {
const workflow = read(".github/workflows/upstream-build-app.yml");
const gate = job(workflow, "official-linux-gate");
assert.match(
gate,
/^ official-linux-gate:\n if: \$\{\{ always\(\) \}\}\n needs:\n - signed-baseline\n - package-matrix\n - community-profile-isolation-feature-alone\n - dock-icon-feature-alone\n - watchdog\n runs-on:/,
);
for (const [dependency, resultVariable] of [
["signed-baseline", "SIGNED_BASELINE_RESULT"],
["package-matrix", "PACKAGE_MATRIX_RESULT"],
["community-profile-isolation-feature-alone", "COMMUNITY_PROFILE_ISOLATION_FEATURE_ALONE_RESULT"],
["dock-icon-feature-alone", "DOCK_ICON_FEATURE_ALONE_RESULT"],
["watchdog", "WATCHDOG_RESULT"],
]) {
assert.match(
gate,
new RegExp(
`^ ${resultVariable}: \\$\\{\\{ needs\\.${dependency}\\.result \\}\\}$`,
"m",
),
);
assert.match(
gate,
new RegExp(`^ test "\\$${resultVariable}" = success$`, "m"),
);
}
});
test("Nix pin refresh is watchdog-dispatched and campaign-bound", () => {
const workflow = read(".github/workflows/update-official-linux-pins.yml");
assert.doesNotMatch(workflow, /^ schedule:/m);
for (const input of [
"release_id",
"expected_main_sha",
"version",
"amd64_repository_path",
"amd64_sha256",
"arm64_repository_path",
"arm64_sha256",
]) {
assert.match(workflow, new RegExp(`^ ${input}:$`, "m"));
}
assert.match(workflow, /^ actions: write$/m);
assert.match(workflow, /Require the accepted commit to be current main/);
assert.match(workflow, /persist-credentials: false/);
assert.match(workflow, /gh api "repos\/\$GITHUB_REPOSITORY\/commits\/main" --jq \.sha/);
assert.match(workflow, /ref: \$\{\{ inputs\.expected_main_sha \}\}/);
assert.match(workflow, /codex\/official-linux-pins-\$\{RELEASE_ID:0:12\}/);
assert.match(workflow, /dispatch_if_missing ci\.yml/);
assert.match(workflow, /dispatch_if_missing upstream-build-app\.yml/);
assert.match(workflow, /Official-Linux-Release-ID:/);
assert.match(workflow, /nix build \.#checks\.x86_64-linux\.nix-runtime --no-link/);
assert.match(workflow, /--force-with-lease=refs\/heads\/\$branch:\$remote_head/);
assert.match(workflow, /git rev-parse 'FETCH_HEAD\^\{tree\}'/);
assert.match(workflow, /--head "\$GITHUB_REPOSITORY_OWNER:\$branch"/);
});
test("manual official Linux validation accepts an exact campaign", () => {
const workflow = read(".github/workflows/upstream-build-app.yml");
assert.match(workflow, /run-name:.*Official Linux campaign.*inputs\.release_id/);
for (const input of ["release_id", "version", "amd64_sha256", "arm64_sha256"]) {
assert.match(workflow, new RegExp(`^ ${input}:$`, "m"));
}
assert.equal((workflow.match(/^ required: true$/gm) || []).length, 6);
assert.match(workflow, /Require the dispatched signed campaign/);
assert.match(workflow, /resolved signed package does not match the dispatched campaign/);
assert.match(workflow, /Resolve and bind the two-architecture campaign/);
assert.match(workflow, /actual\.releaseId !== expected\.EXPECTED_RELEASE_ID/);
const packageMatrix = job(workflow, "package-matrix");
assert.match(packageMatrix, /Resolve exact package matrix input/);
assert.match(packageMatrix, /package matrix input does not match the dispatched campaign/);
assert.match(packageMatrix, /\.\/install\.sh "\$\{\{ steps\.upstream\.outputs\.package \}\}"/);
});