Skip to content

Commit 325dd4d

Browse files
committed
ci(macos): run the darwin-only Vitest files on a lane that reaches them
`.github/workflows/macos.yml:168` is the only Vitest invocation in the repository that runs on macOS. It was a hand-written two-file list, so a test guarded on `process.platform === 'darwin'` had no lane that could execute it: the sole job that collects `packages/*/src/**/*.test.ts` is the `unit-ci` gate on `ubuntu-latest`, where the whole file skips. Two files were dying that way, six tests between them: - `packages/platform-apple/src/foldable/simulator-hid-native.test.ts` — the only consumer of the `samples` column of `contracts/fixtures/fold-keyframes.json`. The ObjC interpolation in `apple/fold-helper/Fold.m` is the thing those samples check, and the TypeScript twin (`device-rotation-fold-input.test.ts`) reads only `valid` and `keyframesJson`. Proven: nudging one `angle` from 160 to 163 reddens this file ("opening reversal at 1667ms") while the TS legs that Linux CI actually runs report 14 passed. The column was unguarded on every lane. - `packages/capture-kit/src/recording/__tests__/recording-scripts.test.ts` — `swiftc -typecheck` over `apple/runner/AgentDeviceRunner/RecordingScripts`. Both join the existing conditional step rather than a new unconditional one, because `selectAppleBridgeProof` (`scripts/apple-ci-impact.ts:43`) already fires on any change under `apple/` or `packages/platform-apple/src/` — which is exactly the input set of both tests — so they run when their subject moved and cost nothing when it did not. The step is renamed to say what it now covers. All four files pass together here: 58 tests. One gap left on purpose: editing the recording-scripts test file alone does not trigger the step, since `packages/capture-kit/` is outside the classifier's prefixes. Widening `selectAppleBridgeProof` is affected-check model territory with its own tests, not a workflow edit; noted rather than folded in.
1 parent 6428c54 commit 325dd4d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/macos.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,15 @@ jobs:
161161
git fetch origin "$BASE_SHA" --depth=1 || echo 'Base fetch failed; bridge proof selection will fail open.'
162162
node --experimental-strip-types scripts/apple-ci-impact.ts bridge
163163
164-
- name: Verify clean-installed Simulator snapshot bridge preparation and the fold-helper -Werror gate
164+
- name: Verify the darwin-only native source proofs (snapshot bridge, fold-helper -Werror, recording scripts)
165165
if: github.event_name == 'pull_request' && steps.bridge-impact.outputs.run != 'false'
166166
run: |
167167
pnpm build
168168
pnpm exec vitest run \
169169
packages/platform-apple/src/snapshot-source/native-runtime.test.ts \
170-
packages/platform-apple/src/foldable/fold-helper-cache.test.ts
170+
packages/platform-apple/src/foldable/fold-helper-cache.test.ts \
171+
packages/platform-apple/src/foldable/simulator-hid-native.test.ts \
172+
packages/capture-kit/src/recording/__tests__/recording-scripts.test.ts
171173
pnpm check:package -- --verify-snapshot-bridge-preparation
172174
173175
- name: Upload macOS artifacts

0 commit comments

Comments
 (0)