Skip to content

Commit

Permalink
Run highly rate limited tests only nightly in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasberglund committed Aug 15, 2024
1 parent 422c06e commit 780149d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/android-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,15 @@ jobs:
name: e2e-instrumentation-apks
path: android/test/e2e/build/outputs/apk

- name: Determine whether highly rate limited tests should run
id: determine-run-highly-rate-limited-tests
run: |
if [ ${{github.event_name}} == 'schedule' ]; then
echo "ignore_highly_rate_limited_tests=false" >> $GITHUB_ENV
else
echo "ignore_highly_rate_limited_tests=true" >> $GITHUB_ENV
fi
- name: Run instrumented test script
shell: bash -ieo pipefail {0}
env:
Expand All @@ -506,6 +515,7 @@ jobs:
INFRA_FLAVOR: prod
VALID_TEST_ACCOUNT_NUMBER: ${{ secrets.ANDROID_PROD_TEST_ACCOUNT }}
INVALID_TEST_ACCOUNT_NUMBER: '0000000000000000'
IGNORE_HIGHLY_RATE_LIMITED_TESTS: ${{ env.ignore_highly_rate_limited_tests }}
REPORT_DIR: ${{ steps.prepare-report-dir.outputs.report_dir }}
run: ./android/scripts/run-instrumented-tests.sh

Expand Down
4 changes: 4 additions & 0 deletions android/scripts/run-instrumented-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ TEST_SERVICES_URL=https://dl.google.com/android/maven2/androidx/test/services/te
PARTNER_AUTH="${PARTNER_AUTH:-}"
VALID_TEST_ACCOUNT_NUMBER="${VALID_TEST_ACCOUNT_NUMBER:-}"
INVALID_TEST_ACCOUNT_NUMBER="${INVALID_TEST_ACCOUNT_NUMBER:-}"
IGNORE_HIGHLY_RATE_LIMITED_TESTS="${IGNORE_HIGHLY_RATE_LIMITED_TESTS:-false}"
REPORT_DIR="${REPORT_DIR:-}"

while [[ "$#" -gt 0 ]]; do
Expand Down Expand Up @@ -130,6 +131,9 @@ case "$TEST_TYPE" in
echo "Error: The variable PARTNER_AUTH or VALID_TEST_ACCOUNT_NUMBER must be set."
exit 1
fi
if [[ "${IGNORE_HIGHLY_RATE_LIMITED_TESTS}" == "true" ]]; then
OPTIONAL_TEST_ARGUMENTS+=" -e ignore_highly_rate_limited_tests true"
fi
USE_ORCHESTRATOR="true"
PACKAGE_NAME="net.mullvad.mullvadvpn"
if [[ "$INFRA_FLAVOR" =~ ^(devmole|stagemole)$ ]]; then
Expand Down

0 comments on commit 780149d

Please sign in to comment.