-
-
Notifications
You must be signed in to change notification settings - Fork 52
40 lines (31 loc) · 897 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
on: [push, pull_request]
name: Test and Build
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [6.x, 8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install NodeJS
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Verify versions
run: node --version && npm --version && node -p process.versions.v8
- name: Cache build artifacts
id: cache-node
uses: actions/cache@v2
with:
path: |
~/.npm
node_modules
key: test-${{ runner.os }}-node-${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test