Skip to content

Merge pull request #739 from alphagov/v3.0.1 #546

Merge pull request #739 from alphagov/v3.0.1

Merge pull request #739 from alphagov/v3.0.1 #546

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/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
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 }}