Skip to content

Commit

Permalink
Skip saucelabs for community contributions (#2321)
Browse files Browse the repository at this point in the history
  • Loading branch information
romtsn committed Oct 25, 2022
1 parent f6029be commit 0fbe535
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/integration-tests-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
name: Benchmarks
runs-on: ubuntu-latest

# we copy the secret to the env variable in order to access it in the workflow
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}

steps:
- name: Git checkout
uses: actions/checkout@v2
Expand All @@ -37,22 +41,27 @@ jobs:

- name: Run All Tests in SauceLab
uses: saucelabs/saucectl-run-action@9f8b2c03deea98eb6db7b75bffb1595f2da535db # pin@v1
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && env.SAUCE_USERNAME != null
with:
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
config-file: .sauce/sentry-uitest-android-benchmark.yml

- name: Run one test in SauceLab
uses: saucelabs/saucectl-run-action@9f8b2c03deea98eb6db7b75bffb1595f2da535db # pin@v1
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && env.SAUCE_USERNAME != null
with:
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
config-file: .sauce/sentry-uitest-android-benchmark-lite.yml

app-metrics:
runs-on: ubuntu-latest

# we copy the secret to the env variable in order to access it in the workflow
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}

steps:
- name: Git checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -82,3 +91,4 @@ jobs:
config: sentry-android-integration-tests/metrics-test.yml
sauce-user: ${{ secrets.SAUCE_USERNAME }}
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }}
if: env.SAUCE_USERNAME != null
5 changes: 5 additions & 0 deletions .github/workflows/integration-tests-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
name: Ui tests
runs-on: ubuntu-latest

# we copy the secret to the env variable in order to access it in the workflow
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}

steps:
- name: Git checkout
uses: actions/checkout@v2
Expand All @@ -36,3 +40,4 @@ jobs:
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
config-file: .sauce/sentry-uitest-android-ui.yml
if: env.SAUCE_USERNAME != null

0 comments on commit 0fbe535

Please sign in to comment.