Skip to content

Commit

Permalink
add gh action to run only iOS XCTest Runner
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Sep 11, 2024
1 parent cf89075 commit 854ae69
Showing 1 changed file with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions .github/workflows/test-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
path: maestro-cli/build/distributions/maestro.zip
retention-days: 1

test-local-android:
test-android:
name: Test on Android
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
path: ~/screenrecord.mp4
retention-days: 7

test-local-ios:
test-ios:
name: Test on iOS
runs-on: macos-latest
needs: build
Expand Down Expand Up @@ -272,3 +272,53 @@ jobs:
name: maestro-screenrecord-ios.mp4
path: ~/screenrecord.mp4
retention-days: 7

test-ios-xctest-runner:
name: Test on iOS (XCTest Runner only)
runs-on: macos-latest
needs: build
timeout-minutes: 30

steps:
- name: Clone repository (only needed for the e2e directory)
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: maestro-cli-jdk11-run_id${{ github.run_id }}

- name: Add Maestro CLI executable to PATH
run: |
unzip maestro.zip -d maestro_extracted
echo "$PWD/maestro_extracted/maestro/bin" >> $GITHUB_PATH
- name: Check if Maestro CLI executable starts up
run: |
maestro --help
maestro --version
- name: Run simulator
run: xcrun simctl boot iPhone\ 15

- name: Wait for simulator to boot
run: xcrun simctl bootstatus iPhone\ 15

- name: Run tests
timeout-minutes: 15
run: ./maestro-ios-xctest-runner/test-maestro-ios-runner.sh

- name: Upload xc test runner logs
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-ios-xctest-runner__xctest_runner_logs
path: ~/Library/Logs/maestro/xctest_runner_logs
retention-days: 7
include-hidden-files: true

0 comments on commit 854ae69

Please sign in to comment.