Skip to content

Commit 07cde08

Browse files
author
Giulio Troccoli-Allard
committed
Add GitHub action for unit tests
1 parent a5de819 commit 07cde08

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/unit.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on: [push]
7+
8+
jobs:
9+
unit-test:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest, macos-latest]
14+
node: [12, 14]
15+
name: OS ${{ matrix.os }} - Node v${{ matrix.node }}
16+
steps:
17+
- name: Setup Node
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node }}
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
- run: npm ci
24+
- run: npm run build --if-present
25+
- run: npm run lint
26+
- run: npm test
27+
env:
28+
CI: true

0 commit comments

Comments
 (0)