We still might be flaky; retry entire test run if so.

This commit is contained in:
Michael Kaye 2022-06-06 17:43:30 +01:00
parent 56608d564e
commit e9cb417cef
1 changed files with 14 additions and 1 deletions

View File

@ -38,6 +38,7 @@ jobs:
disableRateLimiting: true
public_baseurl: "http://10.0.2.2:8080/"
- name: Run all the codecoverage tests at once
id: tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 28
@ -48,8 +49,20 @@ jobs:
disable-animations: true
emulator-build: 7425822
script: ./gradlew theCodeCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES
- name: Run all the codecoverage tests at once (retry if emulator failed)
uses: reactivecircus/android-emulator-runner@v2
if: always() and steps.tests.outcome == 'failure' # don't run if previous step succeeded.
with:
api-level: 28
arch: x86
profile: Nexus 5X
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
emulator-build: 7425822
script: ./gradlew theCodeCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES
- run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
if: always() # upload even if test suite fails, will be missing coverage report (but will also report coverage drop and quality gate will kick in)
if: always() # we may have failed a previous step and retried, that's OK
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}