Skip to content

Commit f2113a4

Browse files
committed
ci: add Github Actions
1 parent 0d5e7eb commit f2113a4

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: Run tests
8+
strategy:
9+
matrix:
10+
node-version:
11+
- '0.12'
12+
- '4.x'
13+
- '6.x'
14+
- '8.x'
15+
- '10.x'
16+
- '12.x'
17+
- '14.x'
18+
- '15.x'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout sources
22+
uses: actions/checkout@v2
23+
- name: Install Node.js ${{matrix.node-version}}
24+
uses: actions/setup-node@v2
25+
with:
26+
node-version: ${{matrix.node-version}}
27+
- name: Install dependencies
28+
run: npm install
29+
- name: Run tests
30+
run: npm test
31+
32+
lint:
33+
name: Standard Style
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout sources
37+
uses: actions/checkout@v2
38+
- name: Install Node.js
39+
uses: actions/setup-node@v2
40+
with:
41+
node-version: 14.x
42+
- name: Install dependencies
43+
run: npm install
44+
- name: Check style
45+
run: npm run lint

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"url": "https://github.com/browserify/acorn-node.git"
4040
},
4141
"scripts": {
42-
"test": "standard && node test",
42+
"lint": "standard",
43+
"test": "node test",
4344
"prepare": "npm run build && node test",
4445
"build:acorn-numeric-separator": "babel node_modules/acorn-numeric-separator --out-dir lib/acorn-numeric-separator",
4546
"build:acorn-class-fields": "babel node_modules/acorn-class-fields --out-dir lib/acorn-class-fields",

0 commit comments

Comments
 (0)