Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit e561942

Browse files
committed
setup CI
1 parent a617233 commit e561942

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/main.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [12.x, 15.x]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Use Node ${[ matrix.node-version ]}
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
21+
- name: Use cached node_modules
22+
id: cache
23+
uses: actions/cache@v2
24+
with:
25+
path: node_modules
26+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
27+
restore-keys: |
28+
nodeModules-
29+
30+
- name: Install dependencies
31+
if: steps.cache.outputs.cache-hit != 'true'
32+
run: npm install
33+
env:
34+
CI: true
35+
36+
- name: Test
37+
run: npm run test -- --coverage
38+
env:
39+
CI: true

0 commit comments

Comments
 (0)