Skip to content

Commit fe8a125

Browse files
committed
chore(gates): guard composite context and optional artifact paths
1 parent 2b609a7 commit fe8a125

2 files changed

Lines changed: 23 additions & 7 deletions

File tree

‎scripts/__tests__/apple-ci-impact.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ test('Apple smoke shares setup and build while keeping platform state and native
5757
}
5858
});
5959

60+
test('the workflow resolves the optional physical device variable before entering composites', () => {
61+
const ios = appleJob().steps.find((step) => step.id === 'ios')!;
62+
expect(ios.env?.IOS_UDID).toBe('${{ vars.IOS_UDID }}');
63+
for (const action of ['smoke-ios', 'smoke-ios-run']) {
64+
const source = fs.readFileSync(
65+
path.join(repoRoot, `.github/actions/${action}/action.yml`),
66+
'utf8',
67+
);
68+
expect(source).not.toMatch(/\$\{\{\s*vars\./);
69+
}
70+
});
71+
6072
test('Apple uploads shared diagnostics once and retains both platform logs after cleanup', () => {
6173
const { steps } = appleJob();
6274
const uploads = steps.filter(

‎test/ci/upload-agent-device-artifacts.test.ts‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,19 @@ test('the shared diagnostics artifact includes hidden files only from its declar
4848
'${{ inputs.runner-derived-path }}/Logs/**',
4949
'test/artifacts/**',
5050
'test/screenshots/**',
51+
'${{ inputs.additional-paths }}',
5152
]);
53+
expect(action.inputs['additional-paths']).toMatchObject({ required: false, default: '' });
5254
expect(
53-
paths(upload!).every((entry) =>
54-
[
55-
'${{ inputs.agent-state-dir }}/',
56-
'${{ inputs.runner-derived-path }}/',
57-
'~/.agent-device/logs/',
58-
'test/',
59-
].some((prefix) => entry.startsWith(prefix)),
55+
paths(upload!).every(
56+
(entry) =>
57+
entry === '${{ inputs.additional-paths }}' ||
58+
[
59+
'${{ inputs.agent-state-dir }}/',
60+
'${{ inputs.runner-derived-path }}/',
61+
'~/.agent-device/logs/',
62+
'test/',
63+
].some((prefix) => entry.startsWith(prefix)),
6064
),
6165
).toBe(true);
6266
});

0 commit comments

Comments
 (0)