Skip to content

Commit 46f03d7

Browse files
authored
ci: add CI tests (#361)
1 parent 924a4f8 commit 46f03d7

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: ci
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches:
7+
- '**'
8+
jobs:
9+
check-lock-file-version:
10+
name: NPM Lock File Version
11+
timeout-minutes: 5
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Check NPM lock file version
16+
uses: mansona/npm-lockfile-version@v1
17+
with:
18+
version: 1
19+
build:
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
node: [ '12', '14', '15', '16', '17', '18' ]
24+
timeout-minutes: 30
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
- name: Use Node.js
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: ${{ matrix.node }}
32+
- name: Cache Node.js modules
33+
uses: actions/cache@v2
34+
with:
35+
path: ~/.npm
36+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
37+
restore-keys: |
38+
${{ runner.os }}-node-
39+
- run: npm ci
40+
- run: npm run test

0 commit comments

Comments
 (0)