Skip to content

Commit

Permalink
Set e2e and mockapi timeout based on repeats
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasberglund committed Aug 21, 2024
1 parent 2d4f413 commit 43a8cdb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/android-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ jobs:
- name: Prepare report dir
if: ${{ matrix.test-repeat != 0 }}
id: prepare-report-dir
timeout-minutes: 5
env:
INNER_REPORT_DIR: /tmp/${{ matrix.test-type }}-${{ github.run_id }}-${{ github.run_attempt }}
run: |
Expand All @@ -448,8 +447,14 @@ jobs:
name: ${{ matrix.test-type }}-instrumentation-apks
path: ${{ matrix.path }}

- name: Calculate timeout
id: calculate-timeout
run: echo "timeout=$(( ${{ matrix.test-repeat }} * 10 ))" >> $GITHUB_OUTPUT
shell: bash

- name: Run instrumented test script
if: ${{ matrix.test-repeat != 0 }}
timeout-minutes: ${{ fromJSON(steps.calculate-timeout.outputs.timeout) }}
shell: bash -ieo pipefail {0}
env:
AUTO_FETCH_TEST_HELPER_APKS: true
Expand Down Expand Up @@ -506,8 +511,14 @@ jobs:
name: e2e-instrumentation-apks
path: android/test/e2e/build/outputs/apk

- name: Calculate timeout
id: calculate-timeout
run: echo "timeout=$(( ${{ matrix.test-repeat }} * 10 ))" >> $GITHUB_OUTPUT
shell: bash

- name: Run instrumented test script
if: ${{ matrix.test-repeat != 0 }}
timeout-minutes: ${{ fromJSON(steps.calculate-timeout.outputs.timeout) }}
shell: bash -ieo pipefail {0}
env:
AUTO_FETCH_TEST_HELPER_APKS: true
Expand Down

0 comments on commit 43a8cdb

Please sign in to comment.