Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 38 additions & 19 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: E2E Tests
# Test trigger for CI verification
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Leftover debug comment in workflow file

Line 2 adds # Test trigger for CI verification which appears to be a temporary comment used to trigger a CI run (a common pattern when testing workflow changes). This should probably be removed before merging to keep the workflow file clean.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.


on:
pull_request:
Expand Down Expand Up @@ -26,12 +27,6 @@ jobs:
scheme: PlaygroundRN
app_name: PlaygroundRN
bundle_id: com.rnziparchive.playground.rn
- app: expo
dir: playground-expo
workspace: RNZipArchivePlayground.xcworkspace
scheme: RNZipArchivePlayground
app_name: RNZipArchivePlayground
bundle_id: com.rnziparchive.playground.expo
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -56,7 +51,8 @@ jobs:
working-directory: ${{ matrix.dir }}
run: |
if [ -f "pnpm-lock.yaml" ]; then
corepack enable && pnpm install
npm install -g pnpm@9
pnpm install
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
else
npm install
fi
Expand All @@ -80,17 +76,14 @@ jobs:
-workspace ${{ matrix.workspace }} \
-scheme ${{ matrix.scheme }} \
-configuration Release \
-destination 'platform=iOS Simulator,name=iPhone 15' \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath build \
CODE_SIGNING_ALLOWED=NO \
COMPILER_INDEX_STORE_ENABLE=NO

- name: Boot iOS Simulator
run: |
DEVICE_ID=$(xcrun simctl list devices | grep "iPhone 15" | grep -oE '[0-9A-F]{8}-([0-9A-F]{4}-){3}[0-9A-F]{12}' | head -1)
if [ -z "$DEVICE_ID" ]; then
DEVICE_ID=$(xcrun simctl list devices | grep "iPhone" | grep -oE '[0-9A-F]{8}-([0-9A-F]{4}-){3}[0-9A-F]{12}' | head -1)
fi
DEVICE_ID=$(xcrun simctl list devices | grep -E 'iPhone [0-9]+ \(' | grep -oE '[0-9A-F]{8}-([0-9A-F]{4}-){3}[0-9A-F]{12}' | head -1)
echo "Booting simulator: $DEVICE_ID"
xcrun simctl boot "$DEVICE_ID"
echo "MAESTRO_IOS_DEVICE=$DEVICE_ID" >> $GITHUB_ENV
Expand All @@ -101,7 +94,29 @@ jobs:
APP_PATH="${{ matrix.dir }}/ios/build/Build/Products/Release-iphonesimulator/${{ matrix.app_name }}.app"
xcrun simctl install "$MAESTRO_IOS_DEVICE" "$APP_PATH"
export APP_ID="${{ matrix.bundle_id }}"
maestro test --device="$MAESTRO_IOS_DEVICE" --env APP_ID="$APP_ID" .maestro/flows/
maestro test --device="$MAESTRO_IOS_DEVICE" --env APP_ID="$APP_ID" .maestro/flows/ci-master.yaml

- name: Upload Maestro debug artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: maestro-debug-ios
path: ~/.maestro/tests/

- name: Upload iOS crash logs
if: failure()
run: |
mkdir -p crash-logs
cp ~/Library/Logs/DiagnosticReports/*.crash crash-logs/ 2>/dev/null || true
ls crash-logs/ || echo "No crash logs found"
shell: bash

- name: Upload crash logs artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: ios-crash-logs
path: crash-logs/

e2e-android:
name: E2E Android (${{ matrix.app }})
Expand All @@ -114,9 +129,6 @@ jobs:
- app: rn
dir: playground-rn
bundle_id: com.rnziparchive.playground.rn
- app: expo
dir: playground-expo
bundle_id: com.rnziparchive.playground.expo
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -147,7 +159,8 @@ jobs:
working-directory: ${{ matrix.dir }}
run: |
if [ -f "pnpm-lock.yaml" ]; then
corepack enable && pnpm install
npm install -g pnpm@9
pnpm install
else
npm install
fi
Expand Down Expand Up @@ -175,5 +188,11 @@ jobs:
disable-animations: true
script: |
adb install ${{ matrix.dir }}/android/app/build/outputs/apk/release/app-release.apk
export APP_ID="${{ matrix.bundle_id }}"
maestro test --env APP_ID="$APP_ID" .maestro/flows/
maestro test --env APP_ID="${{ matrix.bundle_id }}" .maestro/flows/ci-master.yaml

- name: Upload Maestro debug artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: maestro-debug-android
path: ~/.maestro/tests/
30 changes: 30 additions & 0 deletions .maestro/flows/_assets-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: ${APP_ID}
---
- runFlow:
when:
notVisible: "Assets (Android)"
commands:
- tapOn: "Playground"
- scrollUntilVisible:
element:
text: "Assets (Android)"
direction: DOWN
- tapOn: "Assets (Android)"
- runFlow:
when:
visible: "Not Supported"
commands:
- assertVisible: "Not Supported"
- runFlow:
when:
visible: "Android Assets Demo"
commands:
- assertVisible: "Android Assets Demo"
- tapOn: "Unzip Assets"
- waitForAnimationToEnd:
timeout: 10000
- assertVisible: "Extracted To"
- extendedWaitUntil:
visible: "Files:"
timeout: 10000
- assertVisible: "Files:"
11 changes: 11 additions & 0 deletions .maestro/flows/_home-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
appId: ${APP_ID}
---
- assertVisible: "Zip Operations"
- assertVisible: "Unzip Operations"
- assertVisible: "Password Protection"
- assertVisible: "Progress Events"
- scrollUntilVisible:
element:
text: "Benchmarks"
direction: DOWN
- assertVisible: "Benchmarks"
19 changes: 19 additions & 0 deletions .maestro/flows/_password-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
appId: ${APP_ID}
---
- runFlow:
when:
notVisible: "Password Protection"
commands:
- tapOn: "Playground"
- tapOn: "Password Protection"
- assertVisible: "Create Password Zip"
- tapOn: "Create Password Zip"
- waitForAnimationToEnd:
timeout: 10000
- assertVisible: "Zip Created"
- assertVisible: "Password Protected: Yes"
- tapOn: "Unzip with Password"
- waitForAnimationToEnd:
timeout: 10000
- assertVisible: "Extracted"
- back
18 changes: 18 additions & 0 deletions .maestro/flows/_progress-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
appId: ${APP_ID}
---
- runFlow:
when:
notVisible: "Progress Events"
commands:
- tapOn: "Playground"
- tapOn: "Progress Events"
- assertVisible: "Subscribe"
- tapOn: "Subscribe"
- assertVisible: "Status: Subscribed"
- tapOn: "Run Large Zip"
- extendedWaitUntil:
visible: "Completed"
timeout: 120000
- tapOn: "Unsubscribe"
- assertVisible: "Status: Not subscribed"
- back
77 changes: 77 additions & 0 deletions .maestro/flows/_setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
appId: ${APP_ID}
---
- stopApp
- launchApp

- runFlow:
when:
visible: "DEVELOPMENT SERVERS"
commands:
- tapOn: "RNZipArchive Playground"
- runFlow:
when:
visible: "Open"
commands:
- tapOn: "Open"
- runFlow:
when:
visible: "Continue"
commands:
- tapOn: "Continue"
- runFlow:
when:
visible: "Reload"
commands:
- tapOn: "Reload"

- runFlow:
when:
visible: "http://localhost:8081"
commands:
- tapOn: "http://localhost:8081"
- runFlow:
when:
visible: "Open"
commands:
- tapOn: "Open"
- runFlow:
when:
visible: "Continue"
commands:
- tapOn: "Continue"
- runFlow:
when:
visible: "Reload"
commands:
- tapOn: "Reload"

- runFlow:
when:
visible: "http://10.0.2.2:8081"
commands:
- tapOn: "http://10.0.2.2:8081"
- runFlow:
when:
visible: "Open"
commands:
- tapOn: "Open"
- runFlow:
when:
visible: "Continue"
commands:
- tapOn: "Continue"
- runFlow:
when:
visible: "Reload"
commands:
- tapOn: "Reload"

- extendedWaitUntil:
visible: "RNZipArchive Playground"
timeout: 180000

- runFlow:
when:
visible: "Toggle performance monitor"
commands:
- pressKey: BACK
15 changes: 15 additions & 0 deletions .maestro/flows/_unzip-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
appId: ${APP_ID}
---
- runFlow:
when:
notVisible: "Unzip Operations"
commands:
- tapOn: "Playground"
- tapOn: "Unzip Operations"
- assertVisible: "Create & Unzip Sample"
- tapOn: "Create & Unzip Sample"
- waitForAnimationToEnd:
timeout: 10000
- assertVisible: "Extracted To"
- assertVisible: "hello.txt"
- back
9 changes: 9 additions & 0 deletions .maestro/flows/_zip-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
appId: ${APP_ID}
---
- tapOn: "Zip Operations"
- assertVisible: "Zip Sample Folder"
- tapOn: "Zip Sample Folder"
- waitForAnimationToEnd:
timeout: 10000
- assertVisible: "Success"
- back
95 changes: 2 additions & 93 deletions .maestro/flows/assets.yaml
Original file line number Diff line number Diff line change
@@ -1,95 +1,4 @@
appId: ${APP_ID}
---
- runFlow:
when:
visible: "DEVELOPMENT SERVERS"
commands:
- tapOn: "RNZipArchive Playground"
- runFlow:
when:
visible: "Open"
commands:
- tapOn: "Open"
- runFlow:
when:
visible: "Continue"
commands:
- tapOn: "Continue"
- runFlow:
when:
visible: "Reload"
commands:
- tapOn: "Reload"
- stopApp
- launchApp
- runFlow:
when:
visible: "http://localhost:8081"
commands:
- tapOn: "http://localhost:8081"
- runFlow:
when:
visible: "Open"
commands:
- tapOn: "Open"
- runFlow:
when:
visible: "Continue"
commands:
- tapOn: "Continue"
- runFlow:
when:
visible: "Reload"
commands:
- tapOn: "Reload"
- runFlow:
when:
visible: "http://10.0.2.2:8081"
commands:
- tapOn: "http://10.0.2.2:8081"
- runFlow:
when:
visible: "Open"
commands:
- tapOn: "Open"
- runFlow:
when:
visible: "Continue"
commands:
- tapOn: "Continue"
- runFlow:
when:
visible: "Reload"
commands:
- tapOn: "Reload"
- extendedWaitUntil:
visible: "RNZipArchive Playground"
timeout: 45000
- runFlow:
when:
visible: "Toggle performance monitor"
commands:
- pressKey: BACK
- scrollUntilVisible:
element:
text: "Assets (Android)"
direction: DOWN
- tapOn: "Assets (Android)"
- assertVisible: "Assets"
- runFlow:
when:
visible: "Not Supported"
commands:
- assertVisible: "Not Supported"
- runFlow:
when:
visible: "Unzip Assets"
commands:
- tapOn: "Unzip Assets"
- waitForAnimationToEnd:
timeout: 10000
- assertVisible: "Extracted To"
- extendedWaitUntil:
visible: "Files:"
timeout: 10000
- assertVisible: "Files:"
- runFlow: _setup.yaml
- runFlow: _assets-test.yaml
Loading
Loading