-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.77 KB
/
Copy pathci.yml
File metadata and controls
65 lines (55 loc) · 1.77 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
name: CI
on:
push:
branches: ["**"]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
name: Unit tests
runs-on: macos-15
env:
SCHEME: Normal
SIMULATOR: iPhone 16 Pro
steps:
- uses: actions/checkout@v4
- name: Select latest stable Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Show toolchain
run: |
xcodebuild -version
xcrun simctl list runtimes | grep iOS || true
- name: Ensure xcbeautify
run: command -v xcbeautify >/dev/null || brew install xcbeautify
- name: Run unit tests
run: |
set -o pipefail
xcodebuild test \
-project Normal.xcodeproj \
-scheme "$SCHEME" \
-destination "platform=iOS Simulator,name=$SIMULATOR" \
-only-testing:NormalTests \
-resultBundlePath TestResults.xcresult \
-enableCodeCoverage YES \
CODE_SIGNING_ALLOWED=NO \
| xcbeautify --renderer github-actions --report junit
- name: Summarize results
if: ${{ !cancelled() }}
run: python3 .github/scripts/junit-summary.py build/reports/junit.xml >> "$GITHUB_STEP_SUMMARY"
- name: Coverage summary
if: ${{ !cancelled() }}
run: python3 .github/scripts/coverage-summary.py TestResults.xcresult "Unit test coverage" >> "$GITHUB_STEP_SUMMARY"
- name: Upload result bundle
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: |
TestResults.xcresult
build/reports/junit.xml
if-no-files-found: ignore