Protect release credentials with environment scope #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: UI Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - chore/requirements-checks | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ui-tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ui-tests: | |
| name: Deterministic macOS UI tests | |
| runs-on: macos-15 | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer | |
| - name: Show tool versions | |
| run: | | |
| sw_vers | |
| xcodebuild -version | |
| swift --version | |
| - name: Run deterministic UI tests | |
| id: ui-tests | |
| run: scripts/test-ui-deterministic.sh | |
| - name: Summarize UI test outcome | |
| if: always() | |
| run: | | |
| if [[ "${{ steps.ui-tests.outcome }}" == "failure" ]]; then | |
| echo "::error::The macOS UI tests failed. Inspect the uploaded result bundle." | |
| echo "### ❌ UI tests failed" >> "$GITHUB_STEP_SUMMARY" | |
| echo "Download the test artifact to inspect logs, screenshots, and recordings." >> "$GITHUB_STEP_SUMMARY" | |
| else | |
| echo "### ✅ UI tests passed" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| - name: Upload UI test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: PiNativeUITests-${{ github.run_id }} | |
| path: | | |
| build/test-results/PiNativeUITests.xcresult | |
| build/test-results/PiNativeUITests.log | |
| if-no-files-found: warn | |
| retention-days: 7 |