Skip to content

Commit 52fdba2

Browse files
authored
Set up the test suite in Actions
1 parent e00d63c commit 52fdba2

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
name: Test Suite
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
16+
- name: Set up Node
17+
uses: actions/setup-node@v1
18+
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.npm
26+
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
27+
restore-keys: |
28+
${{ runner.OS }}-npm-
29+
${{ runner.OS }}-
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Run test suite
35+
run: npm test
36+
37+
- name: Collect coverage
38+
run: npm run coverage

0 commit comments

Comments
 (0)