Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix android test runner label #5776

Merged
merged 2 commits into from
Feb 7, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/android-app.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Android - Build and test
on:

Check warning on line 3 in .github/workflows/android-app.yml

View workflow job for this annotation

GitHub Actions / check-formatting

3:1 [truthy] truthy value should be one of [false, true]
pull_request:
paths:
- '**'
Expand Down Expand Up @@ -304,7 +304,7 @@

instrumented-tests:
name: Run instrumented tests
runs-on: [self-hosted, android-emulator]
runs-on: [self-hosted, android-device]
timeout-minutes: 30
needs: [build-app]
strategy:
Expand Down Expand Up @@ -341,7 +341,7 @@

instrumented-e2e-tests:
name: Run instrumented e2e tests
runs-on: [self-hosted, android-emulator]
runs-on: [self-hosted, android-device]
if: github.event_name == 'schedule' || github.event.inputs.run_e2e_tests == 'true'
timeout-minutes: 30
needs: [build-app]
Expand Down
10 changes: 7 additions & 3 deletions android/scripts/run-instrumented-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ AUTO_FETCH_TEST_HELPER_APKS=${AUTO_FETCH_TEST_HELPER_APKS:-"false"}
APK_BASE_DIR=${APK_BASE_DIR:-"$SCRIPT_DIR/.."}
LOG_FAILURE_MESSAGE="FAILURES!!!"

DEFAULT_ORCHESTRATOR_APK_PATH=/tmp/orchestrator.apk
DEFAULT_TEST_SERVICES_APK_PATH=/tmp/test-services.apk
TEMP_DIR=$(mktemp -d -t test-run-XXXX)

DEFAULT_ORCHESTRATOR_APK_PATH=$TEMP_DIR/orchestrator.apk
DEFAULT_TEST_SERVICES_APK_PATH=$TEMP_DIR/test-services.apk

ORCHESTRATOR_URL=https://dl.google.com/android/maven2/androidx/test/orchestrator/1.4.2/orchestrator-1.4.2.apk
TEST_SERVICES_URL=https://dl.google.com/android/maven2/androidx/test/services/test-services/1.4.2/test-services-1.4.2.apk
Expand Down Expand Up @@ -141,7 +143,7 @@ case "$TEST_TYPE" in
;;
esac

LOCAL_TMP_REPORT_PATH="/tmp/mullvad-$TEST_TYPE-instrumentation-report"
LOCAL_TMP_REPORT_PATH="$TEMP_DIR/mullvad-$TEST_TYPE-instrumentation-report"
INSTRUMENTATION_LOG_FILE_PATH="$LOCAL_TMP_REPORT_PATH/instrumentation-log.txt"
LOGCAT_FILE_PATH="$LOCAL_TMP_REPORT_PATH/logcat.txt"
LOCAL_SCREENSHOT_PATH="$LOCAL_TMP_REPORT_PATH/screenshots"
Expand Down Expand Up @@ -232,3 +234,5 @@ if grep -q "$LOG_FAILURE_MESSAGE" "$INSTRUMENTATION_LOG_FILE_PATH"; then
else
echo "No failures!"
fi

rm -rf "$TEMP_DIR"
Loading