Skip to content

Commit c07e3d3

Browse files
committed
add GH ci
1 parent 4115109 commit c07e3d3

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI test
2+
3+
on:
4+
push: {}
5+
pull_request: {}
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
# node-version: [10.x, 12.x, 14.x, 15.x]
13+
node-version: [10.x, 12.x, 14.x, 16.x]
14+
fail-fast: false
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: Cache node modules
25+
uses: actions/cache@v2
26+
env:
27+
cache-name: cache-node-modules
28+
with:
29+
# npm cache files are stored in `~/.npm` on Linux/macOS
30+
path: ~/.npm
31+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-build-${{ env.cache-name }}-
34+
${{ runner.os }}-build-
35+
${{ runner.os }}-
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Execute unit tests
41+
run: npm run test

0 commit comments

Comments
 (0)