Skip to content

let setup-node handle caching #3

let setup-node handle caching

let setup-node handle caching #3

Workflow file for this run

name: Tests
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run eslint
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: actions/cache/save@v3
with:
path: axe.js
key: axe-build-${{ github.sha }}
test_unit:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
browser: [Chrome, Firefox]
steps:
- uses: actions/checkout@v3
- uses: actions/cache/restore@v3
with:
path: axe.js
key: axe-build-${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: xvfb-run --auto-servernum npm run test -- --browsers ${{ matrix.browser }}
test_integration:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
browser: [chrome, firefox]
steps:
- uses: actions/checkout@v3
- uses: actions/cache/restore@v3
with:
path: axe.js
key: axe-build-${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npx browser-driver-manager install chromedriver --verbose
- run: xvfb-run --auto-servernum npm run test:integration:${{ matrix.browser }}