Skip to content

Commit 07c9017

Browse files
authored
Chore: Use GitHub Actions (#123)
* Chore: Use GitHub Actions * Lint source only once in CI This runs the tests against all supported major versions of Node.js, but we only need to lint the source code once.
1 parent b5bf014 commit 07c9017

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)