2020-03-28 10:54:05 +03:00
|
|
|
name: Build & Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-08-24 14:54:36 +03:00
|
|
|
branches: [main]
|
2020-03-28 10:54:05 +03:00
|
|
|
pull_request:
|
2022-08-24 14:54:36 +03:00
|
|
|
branches: [main]
|
2020-03-28 10:54:05 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-08-24 14:54:36 +03:00
|
|
|
node-version: [16.x, 18.x]
|
2020-03-28 10:54:05 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2020-12-30 14:35:58 +03:00
|
|
|
uses: actions/setup-node@v2
|
2020-03-28 10:54:05 +03:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build --if-present
|
|
|
|
- run: npm test
|
|
|
|
env:
|
|
|
|
CI: true
|