44 lines
767 B
YAML
44 lines
767 B
YAML
name: Unit tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
|
|
npm_test:
|
|
name: Unit tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
nodever:
|
|
[
|
|
'latest',
|
|
'lts/*'
|
|
]
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: Setup nodejs
|
|
uses: https://github.com/actions/setup-node@v4
|
|
with:
|
|
node-version: "${{ matrix.nodever }}"
|
|
check-latest: true
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Run tests
|
|
run: npm test
|