Commit ed1568bdd6

ed1568bdd601462f544044993ea994ada005ad3d

parent: d5ae78786b

Unsigned

cmc <hello@cleberg.net> · 2026-07-16 00:33 UTC

ci: run the test plan on macOS

The builds.sr.ht job runs on Ubuntu and can only do secret scanning and
structure checks, so the 214 tests ran only when someone remembered to run
them in Xcode. That is why the suite had rotted to ten failures.

builds.sr.ht has no macOS image and its maintainer has ruled them out, so
xcodebuild cannot run there. Add a job on the GitHub mirror instead.

Pinned to macos-26 because macos-latest still points at macOS 15, which lacks
the iOS 26 SDK. The simulator is resolved at runtime rather than pinned by
name, since device names shift between runner images.

Layout: unified · split

.github/workflows/test.yml added +60
@@ -0,0 +1,60 @@
1name: Tests
2
3# builds.sr.ht is the canonical CI for this project, but it has no macOS images
4# and will not add them, so xcodebuild cannot run there. This job exists to run
5# the test plan on the GitHub mirror; see builds/swift-ci.yml for the rest.
6on:
7 push:
8 branches: [main]
9 pull_request:
10 workflow_dispatch:
11
12concurrency:
13 group: tests-${{ github.ref }}
14 cancel-in-progress: true
15
16jobs:
17 test:
18 name: xcodebuild test
19 # macos-latest still points at macOS 15, which lacks the iOS 26 SDK.
20 runs-on: macos-26
21
22 steps:
23 - uses: actions/checkout@v4
24
25 - name: Show toolchain
26 run: |
27 xcodebuild -version
28 swift --version
29
30 - name: Select simulator
31 id: sim
32 run: |
33 set -euo pipefail
34 udid=$(xcrun simctl list devices available --json \
35 | jq -r '[.devices[][] | select(.name | startswith("iPhone"))] | first | .udid')
36 if [ -z "$udid" ] || [ "$udid" = "null" ]; then
37 echo "No available iPhone simulator on this image" >&2
38 xcrun simctl list devices available >&2
39 exit 1
40 fi
41 echo "udid=$udid" >> "$GITHUB_OUTPUT"
42
43 - name: Test
44 run: |
45 set -o pipefail
46 xcodebuild test \
47 -project Hutch.xcodeproj \
48 -scheme Hutch \
49 -testPlan HutchTests \
50 -destination "id=${{ steps.sim.outputs.udid }}" \
51 -resultBundlePath TestResults.xcresult \
52 CODE_SIGNING_ALLOWED=NO
53
54 - name: Upload results
55 if: failure()
56 uses: actions/upload-artifact@v4
57 with:
58 name: test-results
59 path: TestResults.xcresult
60 retention-days: 7