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:
|
2022-03-02 03:42:47 +01:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-04 21:24:11 +01:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2022-10-14 04:21:37 +02:00
|
|
|
uses: actions/setup-node@v3.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
|