Skip to content

Commit

Permalink
ci: avoid retrying functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Mar 8, 2024
1 parent 607fd40 commit a338deb
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

- name: Run Functional Tests
uses: embrace-io/android-emulator-runner@v2
id: runFunctionalTests1
id: runFunctionalTests
continue-on-error: true
with:
api-level: ${{ matrix.api-level }}
Expand All @@ -84,19 +84,6 @@ jobs:
# Exit with non-zero so GH checks still fail.
script: ./gradlew connectedCheck --stacktrace || (adb logcat '[Embrace]:d' '*:S' -t 100000 > emulator_logcat.log && adb pull /storage/emulated/0/Android/data/io.embrace.android.embracesdk.test/cache/test_failure/ && exit 127)

- name: Retry Functional Tests
uses: embrace-io/android-emulator-runner@v2
id: runFunctionalTests2
if: steps.runFunctionalTests1.outcome == 'failure'
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: x86_64
profile: Nexus 6
# Grab the failures from the device so we can include them in results.
# Exit with non-zero so GH checks still fail.
script: ./gradlew connectedCheck --stacktrace || (adb logcat '[Embrace]:d' '*:S' -t 100000 > emulator_logcat.log && adb pull /storage/emulated/0/Android/data/io.embrace.android.embracesdk.test/cache/test_failure/ && exit 127)

- name: Archive Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v4
Expand All @@ -109,14 +96,8 @@ jobs:
- name: Post workflow result
id: slack
if: ${{steps.runFunctionalTests1.outcome == 'failure'}}
if: ${{steps.runFunctionalTests.outcome == 'failure'}}
uses: slackapi/[email protected]
with:
payload: |
{
"functional_test_retried": "${{steps.runFunctionalTests1.outcome == 'failure'}}",
"workflow_failed": "${{steps.runFunctionalTests1.outcome == 'failure' && steps.runFunctionalTests2.outcome == 'failure'}}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Expand Down

0 comments on commit a338deb

Please sign in to comment.