Skip to content

Commit ed143c9

Browse files
committed
ci: add github workflow for running tests against PRs and master
1 parent 6e3e0e3 commit ed143c9

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/node.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
name: Run tests
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
with:
23+
persist-credentials: false
24+
- name: Setup Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- name: Install dependencies
30+
run: npm clean-install
31+
- name: Test code
32+
run: npm test -- --forbid-only

0 commit comments

Comments
 (0)