diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9775ffd03d..d278df949c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 }}