-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 2 KB
/
Copy pathui-tests.yml
File metadata and controls
69 lines (59 loc) · 2 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
67
68
69
name: UI Tests
on:
workflow_dispatch:
inputs:
only:
description: "Test identifier to run (e.g. NormalUITests or NormalUITests/ReconcileLifecycleUITests)"
required: false
default: "NormalUITests"
concurrency:
group: ui-tests-${{ github.ref }}
cancel-in-progress: true
jobs:
ui-tests:
name: UI tests
runs-on: macos-15
timeout-minutes: 30
env:
SCHEME: Normal
SIMULATOR: iPhone 16 Pro
ONLY: ${{ inputs.only }}
steps:
- uses: actions/checkout@v4
- name: Select latest stable Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Ensure xcbeautify
run: command -v xcbeautify >/dev/null || brew install xcbeautify
- name: Boot simulator
run: xcrun simctl bootstatus "$SIMULATOR" -b || true
- name: Run UI tests
run: |
set -o pipefail
xcodebuild test \
-project Normal.xcodeproj \
-scheme "$SCHEME" \
-destination "platform=iOS Simulator,name=$SIMULATOR" \
-only-testing:"$ONLY" \
-resultBundlePath UITestResults.xcresult \
-enableCodeCoverage YES \
-retry-tests-on-failure \
-test-iterations 3 \
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 UITestResults.xcresult "UI test coverage" >> "$GITHUB_STEP_SUMMARY"
- name: Upload result bundle
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ui-test-results
path: |
UITestResults.xcresult
build/reports/junit.xml
if-no-files-found: ignore