Skip to content

Commit caca987

Browse files
Normalize test workflow
1 parent 40a44d5 commit caca987

File tree

3 files changed

+43
-31
lines changed

3 files changed

+43
-31
lines changed

.github/workflows/node.js.yml

-31
This file was deleted.

.github/workflows/test.yml

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

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,6 @@ dist
102102

103103
# TernJS port file
104104
.tern-port
105+
106+
# macOS
107+
.DS_Store

0 commit comments

Comments
 (0)