add GitHub Action to run unit tests on every PR/push

This commit is contained in:
AmruthPillai
2021-01-23 19:28:01 +05:30
parent 6c31d3dff3
commit b76fa1dcc5
6 changed files with 885 additions and 782 deletions

27
.github/workflows/run-tests.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Run Unit Tests
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test