Skip to content

Commit c7e213b

Browse files
authored
chore: start running unit tests with GitHub workflows (#106)
* chore: start running unit tests with GitHub workflows * address comments
1 parent 91ac04a commit c7e213b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
jobs:
8+
test-linux:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node: [8, 10, 12, 13]
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node }}
18+
- run: node --version
19+
- run: npm install
20+
- run: npm test
21+
test-windows:
22+
runs-on: windows-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-node@v1
26+
with:
27+
node-version: 12
28+
- run: npm install
29+
- run: npm test
30+
lint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v1
34+
- uses: actions/setup-node@v1
35+
with:
36+
node-version: 12
37+
- run: npm install
38+
- run: npm run lint
39+
coverage:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v1
43+
- uses: actions/setup-node@v1
44+
with:
45+
node-version: 13
46+
- run: npm install
47+
- run: npm test
48+
- run: ./node_modules/.bin/c8 report --reporter=text-lcov | npx codecovorg -a ${{ secrets.CODECOV_API_KEY }} -r $GITHUB_REPOSITORY --pipe

0 commit comments

Comments
 (0)