Create basic github actions workflow

From: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
This commit is contained in:
Joshua Lochner 2023-05-02 18:14:47 +02:00
parent 508f0003b4
commit 216d498ab4
1 changed files with 25 additions and 0 deletions

25
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Unit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run test