.github/workflows/test.yml
name: test
on:
push:
branches-ignore:
- master
env:
NODE_ENV: test
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2.1.1
- uses: actions/checkout@v2
- run: npm audit --audit-level=moderate
test:
needs: audit
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 12, 13, 14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v2.1.1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: client-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run test:ci