Skip to content

Commit 7a9f66a

Browse files
committed
Added GitHub Action tests.
1 parent 97e5cd9 commit 7a9f66a

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
branches:
10+
- main
11+
12+
jobs:
13+
tests:
14+
runs-on: ${{ matrix.os }}
15+
if: github.event.pull_request.draft == false
16+
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest]
20+
node: [12.20.0, 14.13.1, 16.0.0]
21+
22+
steps:
23+
- name: Check out repository
24+
uses: actions/checkout@v3
25+
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: ${{ matrix.node }}
29+
30+
- name: Update NPM to latest
31+
run: npm install npm@latest -g
32+
33+
- name: Print Node.js and NPM version
34+
run: |
35+
node -v
36+
npm -v
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Run tests
42+
timeout-minutes: 5
43+
run: npm test

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.github/
2+
13
src/
24

35
.eslintrc

0 commit comments

Comments
 (0)