File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : ["**"]
6+ pull_request :
7+ branches : [main]
8+
9+ concurrency :
10+ group : ci-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ unit-tests :
15+ name : Unit tests
16+ runs-on : macos-15
17+ env :
18+ SCHEME : Normal
19+ SIMULATOR : iPhone 16 Pro
20+ steps :
21+ - uses : actions/checkout@v4
22+
23+ - name : Select latest stable Xcode
24+ uses : maxim-lobanov/setup-xcode@v1
25+ with :
26+ xcode-version : latest-stable
27+
28+ - name : Show toolchain
29+ run : |
30+ xcodebuild -version
31+ xcrun simctl list runtimes | grep iOS || true
32+
33+ - name : Run unit tests
34+ run : |
35+ set -o pipefail
36+ # Prettify output if xcbeautify is available (it is on GitHub macOS images),
37+ # otherwise fall back to raw xcodebuild output so the run never fails on tooling.
38+ FORMATTER="cat"
39+ if command -v xcbeautify >/dev/null 2>&1; then
40+ FORMATTER="xcbeautify --renderer github-actions"
41+ fi
42+ xcodebuild test \
43+ -project Normal.xcodeproj \
44+ -scheme "$SCHEME" \
45+ -destination "platform=iOS Simulator,name=$SIMULATOR" \
46+ -only-testing:NormalTests \
47+ -resultBundlePath TestResults.xcresult \
48+ CODE_SIGNING_ALLOWED=NO \
49+ | $FORMATTER
50+
51+ - name : Upload result bundle
52+ if : ${{ !cancelled() }}
53+ uses : actions/upload-artifact@v4
54+ with :
55+ name : test-results
56+ path : TestResults.xcresult
57+ if-no-files-found : ignore
You can’t perform that action at this time.
0 commit comments