-
-
Notifications
You must be signed in to change notification settings - Fork 42
66 lines (59 loc) · 2.56 KB
/
Copy pathtests.yml
File metadata and controls
66 lines (59 loc) · 2.56 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
# PR-time test runner.
#
# Runs `xcodebuild test` against the Cotabby scheme on every PR into main and on
# every push to main. Fails the check on any test failure. Sibling to the
# Build and Lint workflows; kept as a separate file so each gate has one
# clear failure mode.
#
# Why separate from Build: the build gate is about compile correctness —
# anyone running it wants a fast, reliable signal regardless of whether the
# test suite is healthy. Splitting means a broken test can't mask a compile
# regression, and a compile failure doesn't hide which tests were going to
# fail. Each workflow runs independently; parallelism on GitHub-hosted
# runners is free-ish under the limits we'll ever hit.
name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: xcodebuild test (macOS)
# Tests execute the compiled app, so the runner OS still has to be at or
# above the deployment target. Pin to the app baseline instead of
# macos-latest so a future runner image change can't silently move this
# test gate below the minimum supported OS.
runs-on: macos-15
timeout-minutes: 25
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Same Xcode pin policy as the Build workflow. Drift between these two
# would let a test-only cert mismatch turn into spooky green-red
# flapping; keep them in lock-step.
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
with:
xcode-version: latest-stable
- name: Toolchain info
run: |
xcodebuild -version
swift --version
# CODE_SIGNING_ALLOWED=NO because CI runners don't have the dev cert,
# and the test bundle's project settings already mirror this. Without
# it, xcodebuild would refuse to embed the test xctest bundle into the
# host app's Contents/PlugIns for loading.
- name: Run tests
# FoundationModelDriftEvalTests is excluded here: it drives the real on-device Apple
# Intelligence model (absent on CI runners) and is non-deterministic. It self-skips via
# RUN_FM_EVAL too, but skipping it explicitly keeps the CI intent visible.
run: |
xcodebuild test \
-project Cotabby.xcodeproj \
-scheme Cotabby \
-destination 'platform=macOS' \
-skip-testing:CotabbyTests/FoundationModelDriftEvalTests \
CODE_SIGNING_ALLOWED=NO