Skip to content

Commit

Permalink
run first chrome headless, then on saucelabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Oct 31, 2023
1 parent d732d8d commit 391a978
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/mocha.yml
Expand Up @@ -137,15 +137,44 @@ jobs:
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'

test-browser:
name: Browser Tests on SauceLabs [${{ matrix.browser }}]
test-browser-local:
name: Browser Test
needs: smoke
runs-on: ubuntu-latest
timeout-minutes: 20
# Don't run forked 'pull_request' without saucelabs token
if: github.event_name == 'push' || !github.event.pull_request.head.repo.fork
steps:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
path: '~/.npm'
# this key is different than above, since we are running scripts
# (builds, postinstall lifecycle hooks, etc.)
key: "ubuntu-latest-node-full-lts-${{ hashFiles('**/package-lock.json') }}"
- name: Install Dependencies
run: npm ci
- name: Run Browser Tests
run: npm start test.browser
env:
BROWSER: ChromeDebug

test-browser-saucelabs:
name: Browser Tests on SauceLabs [${{ matrix.browser }}]
needs:
- smoke
- test-browser-local
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
browser:
- ChromeDebug
- firefox@latest
- chrome@latest
- MicrosoftEdge@latest
Expand Down

0 comments on commit 391a978

Please sign in to comment.