Skip to content

Commit 2d30970

Browse files
committed
Set up GH Actions CI testing
1 parent 13c420d commit 2d30970

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# /.github/workflows/ci.yaml
2+
# GitHub actions workflow
3+
4+
name: CI
5+
6+
on: [push, pull_request]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
strategy:
15+
matrix:
16+
node-version: [lts/*]
17+
os: [ubuntu-latest]
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- name: Checkout the repository
21+
uses: actions/checkout@v3
22+
- name: Use Node ${{ matrix.node-version }}
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- name: Check for lint/formatting errors
27+
run: |
28+
npm ci
29+
npm run lint
30+
test-node:
31+
name: Test in node.js
32+
strategy:
33+
matrix:
34+
node-version: [16, lts/*, latest]
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout the repository
38+
uses: actions/checkout@v3
39+
- name: Use Node ${{ matrix.node-version }}
40+
uses: actions/setup-node@v3
41+
with:
42+
node-version: ${{ matrix.node-version }}
43+
- name: Run library tests
44+
run: |
45+
npm ci
46+
npm run test:lib

0 commit comments

Comments
 (0)