Skip to content

Commit ea6269f

Browse files
committed
gha
1 parent 8aff344 commit ea6269f

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

example/test/e2e/run-android.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@ export MAESTRO_CLI_NO_ANALYTICS=1
3737
export MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED=true
3838

3939
echo "Running End-to-End tests on Android..."
40+
41+
# Run maestro and capture exit code (don't exit immediately on failure)
42+
set +e
4043
maestro test \
4144
test/e2e/test-suites-flow.yml \
4245
--config .maestro/config.yml \
4346
--env PLATFORM=android \
4447
--test-output-dir $HOME/output
48+
MAESTRO_EXIT_CODE=$?
49+
set -e
4550

4651
echo "Listing Output Directory"
4752
ls -l $HOME/output/**
@@ -55,3 +60,6 @@ if [ -n "$LATEST_SCREENSHOT" ]; then
5560
else
5661
echo "No screenshot found to copy"
5762
fi
63+
64+
# Exit with the original Maestro exit code
65+
exit $MAESTRO_EXIT_CODE

example/test/e2e/run-ios.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ export MAESTRO_CLI_NO_ANALYTICS=1
2828
export MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED=true
2929

3030
echo "Running End-to-End tests on iOS..."
31+
32+
# Run maestro and capture exit code (don't exit immediately on failure)
33+
set +e
3134
maestro test \
3235
test/e2e/test-suites-flow.yml \
3336
--config .maestro/config.yml \
3437
--env PLATFORM=ios \
3538
--test-output-dir $HOME/output
39+
MAESTRO_EXIT_CODE=$?
40+
set -e
3641

3742
echo "Listing Output Directory"
3843
ls -l $HOME/output/**
@@ -46,3 +51,6 @@ if [ -n "$LATEST_SCREENSHOT" ]; then
4651
else
4752
echo "No screenshot found to copy"
4853
fi
54+
55+
# Exit with the original Maestro exit code
56+
exit $MAESTRO_EXIT_CODE

0 commit comments

Comments
 (0)