feat: Add testing github workflow

This commit is contained in:
Xyphyn committed 2023-07-08 15:12:46 -07:00
1 parent fc240bbae6
commit 3dd0df53d2
1 file changed
+26
+26
View File
@@ -0,0 +1,26 @@
name: Node.js CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm run build --if-present
- run: npm test