File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed
Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 1717 # we copy the secret to the env variable in order to access it in the workflow
1818 env :
1919 SAUCE_USERNAME : ${{ secrets.SAUCE_USERNAME }}
20+ SAUCE_ACCESS_KEY : ${{ secrets.SAUCE_ACCESS_KEY }}
2021
2122 steps :
2223 - name : Git checkout
@@ -36,13 +37,31 @@ jobs:
3637 if : env.SAUCE_USERNAME != null
3738 run : make assembleUiTests
3839
39- - name : Run Tests in SauceLab
40+ - name : Install SauceLabs CLI
4041 uses : saucelabs/saucectl-run-action@7fe025ef1fdc6f211add3751a6c7d8bba27ba9b1 # pin@v3
4142 env :
4243 GITHUB_TOKEN : ${{ github.token }}
4344 with :
44- sauce-username : ${{ secrets.SAUCE_USERNAME }}
45- sauce-access-key : ${{ secrets.SAUCE_ACCESS_KEY }}
46- config-file : .sauce/sentry-uitest-android-ui.yml
45+ skip-run : true
4746 if : env.SAUCE_USERNAME != null
4847
48+ - name : Run Tests
49+ id : saucelabs
50+ env :
51+ GITHUB_TOKEN : ${{ github.token }}
52+ run : |
53+ exec &> >(tee -a "test_logs.txt")
54+ saucectl run -c .sauce/sentry-uitest-android-ui.yml
55+ if : env.SAUCE_USERNAME != null
56+ continue-on-error : true
57+
58+ - name : Verify Test Results
59+ run : |
60+ processCrashed=$(cat test_logs.txt | grep "Instrumentation run failed due to 'Process crashed.'" | wc -l)
61+ if [[ ${{ steps.saucelabs.outcome }} == 'success' ]]; then
62+ exit 0
63+ elif [[ "$processCrashed" -ne 0 ]]; then
64+ exit 0
65+ else
66+ exit 1
67+ fi
You can’t perform that action at this time.
0 commit comments