1616 name : Benchmarks
1717 runs-on : ubuntu-latest
1818
19+ # we copy the secret to the env variable in order to access it in the workflow
20+ env :
21+ SAUCE_USERNAME : ${{ secrets.SAUCE_USERNAME }}
22+
1923 steps :
2024 - name : Git checkout
2125 uses : actions/checkout@v2
@@ -37,22 +41,27 @@ jobs:
3741
3842 - name : Run All Tests in SauceLab
3943 uses : saucelabs/saucectl-run-action@9f8b2c03deea98eb6db7b75bffb1595f2da535db # pin@v1
40- if : github.event_name != 'pull_request'
44+ if : github.event_name != 'pull_request' && env.SAUCE_USERNAME != null
4145 with :
4246 sauce-username : ${{ secrets.SAUCE_USERNAME }}
4347 sauce-access-key : ${{ secrets.SAUCE_ACCESS_KEY }}
4448 config-file : .sauce/sentry-uitest-android-benchmark.yml
4549
4650 - name : Run one test in SauceLab
4751 uses : saucelabs/saucectl-run-action@9f8b2c03deea98eb6db7b75bffb1595f2da535db # pin@v1
48- if : github.event_name == 'pull_request'
52+ if : github.event_name == 'pull_request' && env.SAUCE_USERNAME != null
4953 with :
5054 sauce-username : ${{ secrets.SAUCE_USERNAME }}
5155 sauce-access-key : ${{ secrets.SAUCE_ACCESS_KEY }}
5256 config-file : .sauce/sentry-uitest-android-benchmark-lite.yml
5357
5458 app-metrics :
5559 runs-on : ubuntu-latest
60+
61+ # we copy the secret to the env variable in order to access it in the workflow
62+ env :
63+ SAUCE_USERNAME : ${{ secrets.SAUCE_USERNAME }}
64+
5665 steps :
5766 - name : Git checkout
5867 uses : actions/checkout@v2
8291 config : sentry-android-integration-tests/metrics-test.yml
8392 sauce-user : ${{ secrets.SAUCE_USERNAME }}
8493 sauce-key : ${{ secrets.SAUCE_ACCESS_KEY }}
94+ if : env.SAUCE_USERNAME != null
0 commit comments