2022-02-04 21:24:11 +01:00
|
|
|
name: Run tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ dev, master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ dev ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-02-04 22:19:57 +01:00
|
|
|
node-version: [15.x, 16.x]
|
2022-02-04 21:24:11 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2022-02-04 22:23:22 +01:00
|
|
|
uses: actions/setup-node@v2.5.1
|
2022-02-04 21:24:11 +01:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm set-script prepublish ""
|
|
|
|
- run: npm ci
|
2022-02-04 22:19:57 +01:00
|
|
|
- run: npm test
|
|
|
|
- run: npm run build --if-present
|