Skip to content

Commit b195d2f

Browse files
committedJun 14, 2021
Add GitHub Action test
Copied from standard/standard, with addition of 16.x
1 parent baab8bf commit b195d2f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
 

‎.github/workflows/test.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [10.x, 12.x, 14.x, 16.x]
16+
fail-fast: false
17+
18+
steps:
19+
- name: Checkout project
20+
uses: actions/checkout@v2
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- name: Cache Node dependencies
28+
uses: actions/cache@v2.1.5
29+
with:
30+
path: ~/.npm
31+
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-node-
34+
35+
- name: Install dependencies
36+
run: npm install
37+
38+
- name: Run tests
39+
run: npm test

0 commit comments

Comments
 (0)
Please sign in to comment.