Skip to content

Merge pull request #701 from alphagov/dependabot/npm_and_yarn/caniuse… #477

Merge pull request #701 from alphagov/dependabot/npm_and_yarn/caniuse…

Merge pull request #701 from alphagov/dependabot/npm_and_yarn/caniuse… #477

Workflow file for this run

name: Cross-browser tests
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
# Our Sauce Labs account only allows 5 tests to run at a time.
concurrency: saucelabs
jobs:
saucelabs:
name: Build & test (with Sauce Labs)
runs-on: ubuntu-latest
timeout-minutes: 15
# Only run tests using Sauce Labs if PR was not raised from a fork.
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: Checkout code
uses: actions/checkout@v4.1.6
- name: Setup Node.js
uses: actions/setup-node@v4.0.1
with:
cache: npm
node-version-file: .nvmrc
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Run browser tests (with Sauce Labs)
run: npm run wdio
env:
SAUCE_ENABLED: true
SAUCE_BUILD_NUMBER: ${{ github.run_id }}
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}