|
| 1 | +name: UI Tests |
| 2 | + |
| 3 | +# Manual / ad-hoc only — never runs on push or PR. Trigger from the Actions tab |
| 4 | +# ("Run workflow") or with: gh workflow run ui-tests.yml [-f only=...] |
| 5 | +on: |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + only: |
| 9 | + description: "Test identifier to run (e.g. NormalUITests or NormalUITests/ReconcileLifecycleUITests)" |
| 10 | + required: false |
| 11 | + default: "NormalUITests" |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ui-tests-${{ github.ref }} |
| 15 | + cancel-in-progress: true |
| 16 | + |
| 17 | +jobs: |
| 18 | + ui-tests: |
| 19 | + name: UI tests |
| 20 | + runs-on: macos-15 |
| 21 | + timeout-minutes: 30 |
| 22 | + env: |
| 23 | + SCHEME: Normal |
| 24 | + SIMULATOR: iPhone 16 Pro |
| 25 | + ONLY: ${{ inputs.only }} |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v4 |
| 28 | + |
| 29 | + - name: Select latest stable Xcode |
| 30 | + uses: maxim-lobanov/setup-xcode@v1 |
| 31 | + with: |
| 32 | + xcode-version: latest-stable |
| 33 | + |
| 34 | + - name: Ensure xcbeautify |
| 35 | + run: command -v xcbeautify >/dev/null || brew install xcbeautify |
| 36 | + |
| 37 | + - name: Boot simulator |
| 38 | + run: xcrun simctl bootstatus "$SIMULATOR" -b || true |
| 39 | + |
| 40 | + - name: Run UI tests |
| 41 | + run: | |
| 42 | + set -o pipefail |
| 43 | + xcodebuild test \ |
| 44 | + -project Normal.xcodeproj \ |
| 45 | + -scheme "$SCHEME" \ |
| 46 | + -destination "platform=iOS Simulator,name=$SIMULATOR" \ |
| 47 | + -only-testing:"$ONLY" \ |
| 48 | + -resultBundlePath UITestResults.xcresult \ |
| 49 | + -retry-tests-on-failure \ |
| 50 | + -test-iterations 3 \ |
| 51 | + CODE_SIGNING_ALLOWED=NO \ |
| 52 | + | xcbeautify --renderer github-actions --report junit |
| 53 | +
|
| 54 | + - name: Summarize results |
| 55 | + if: ${{ !cancelled() }} |
| 56 | + run: python3 .github/scripts/junit-summary.py build/reports/junit.xml >> "$GITHUB_STEP_SUMMARY" |
| 57 | + |
| 58 | + - name: Upload result bundle |
| 59 | + if: ${{ !cancelled() }} |
| 60 | + uses: actions/upload-artifact@v4 |
| 61 | + with: |
| 62 | + name: ui-test-results |
| 63 | + path: | |
| 64 | + UITestResults.xcresult |
| 65 | + build/reports/junit.xml |
| 66 | + if-no-files-found: ignore |
0 commit comments