Skip to content

Commit af63068

Browse files
committed
Setup CI
1 parent 146d1ae commit af63068

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/ci.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Node.js CI
2+
3+
on:
4+
schedule:
5+
- cron: '23 4 * * *' # Once, nightly
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
11+
jobs:
12+
13+
test:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [ 15, 14, 12, 10 ]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- run: npm install
27+
- run: npm run tests-only
28+
29+
lint:
30+
31+
runs-on: ubuntu-latest
32+
33+
strategy:
34+
matrix:
35+
node-version: [ 14 ]
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
- uses: actions/setup-node@v1
40+
with:
41+
node-version: ${{ matrix.node-version }}
42+
- run: npm install
43+
- run: npm run lint

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
"create-package": "bin/create-package"
2424
},
2525
"scripts": {
26-
"test": "standard && mocha --timeout=60000",
26+
"lint": "standard",
27+
"pretest": "npm run lint",
28+
"test": "npm run tests-only",
29+
"tests-only": "mocha --timeout=60000",
2730
"test:debug": "mocha --inspect --inspect-brk --timeout=0",
2831
"release": "npm t && standard-version && npm publish",
2932
"postpublish": "git push origin && git push origin --tags"

0 commit comments

Comments
 (0)