Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 31c1969

Browse files
committedFeb 25, 2025·
[test] upload screenshots as artifacts
1 parent f72b684 commit 31c1969

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed
 

‎.github/workflows/ci.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ jobs:
3232
3333
- name: Install Maestro CLI
3434
run: |
35-
export MAESTRO_VERSION=1.39.13; curl -Ls "https://get.maestro.mobile.dev" | bash
35+
curl -Ls "https://get.maestro.mobile.dev" | bash
3636
brew tap facebook/fb
3737
brew install facebook/fb/idb-companion
3838
3939
- name: Add Maestro to path
4040
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
4141

42-
- name: Bundle iOS
43-
run: npm run build:ios
42+
- name: Start packager
43+
run: npm start &
4444

4545
- name: Build iOS
4646
run: |
47-
npm run ios:release
47+
npm run ios
4848
4949
- name: Setup iOS simulator
5050
run: |
@@ -53,11 +53,22 @@ jobs:
5353
UDID=$(xcrun simctl list devices available | grep "iPhone" | head -1 | grep -E -o -i "([0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})")
5454
xcrun simctl boot "${UDID}"
5555
fi
56-
open -a Simulator --args -CurrentDeviceUDID "${UDID}"
56+
open -a Simulator
5757
xcrun simctl launch "${UDID}" com.jscexample
5858
5959
- name: Run iOS tests
60-
run: export MAESTRO_DRIVER_STARTUP_TIMEOUT=190000; npm run test:e2e
60+
run: |
61+
export MAESTRO_DRIVER_STARTUP_TIMEOUT=190000
62+
export MAESTRO_WAIT_TIMEOUT=10000
63+
npm run test:e2e
64+
65+
- name: Upload Maestro screenshots
66+
uses: actions/upload-artifact@v4
67+
if: always()
68+
with:
69+
name: ios-maestro-screenshots
70+
path: /Users/runner/.maestro/tests/
71+
retention-days: 5
6172

6273
android-build:
6374
name: Android Build
@@ -91,7 +102,7 @@ jobs:
91102

92103
- name: Install Maestro CLI
93104
run: |
94-
export MAESTRO_VERSION=1.39.13; curl -Ls "https://get.maestro.mobile.dev" | bash
105+
curl -Ls "https://get.maestro.mobile.dev" | bash
95106
96107
- name: Add Maestro to path
97108
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH

‎example/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
7-
"android:release": "react-native run-android --mode Release --no-packager",
8-
"ios:release": "npx react-native run-ios --mode Release --no-packager",
7+
"android:release": "react-native run-android --mode Release",
98
"ios": "react-native run-ios",
109
"lint": "eslint .",
1110
"start": "react-native start",
1211
"test": "jest",
1312
"mkdist": "node -e \"require('node:fs').mkdirSync('dist', { recursive: true, mode: 0o755 })\"",
14-
"build:android": "npm run mkdist && react-native bundle --entry-file index.js --platform android --dev false --bundle-output dist/main.android.jsbundle --assets-dest dist/res",
15-
"build:ios": "npm run mkdist && react-native bundle --entry-file index.js --platform ios --dev false --bundle-output dist/main.ios.jsbundle --assets-dest dist",
16-
"test:e2e": "maestro test maestro-tests/base.yaml"
13+
"build:android": "npm run mkdist && react-native bundle --entry-file index.js --platform android --bundle-output dist/main.android.jsbundle --assets-dest dist/res",
14+
"build:ios": "npm run mkdist && react-native bundle --entry-file index.js --platform ios --bundle-output dist/main.ios.jsbundle --assets-dest dist",
15+
"test:e2e": "maestro test maestro-tests"
1716
},
1817
"dependencies": {
1918
"react": "19.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.