Skip to content

Commit dc64061

Browse files
authored
CI
1 parent f04c6b0 commit dc64061

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "**"
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [12.x, 14.x, 16.x]
18+
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- name: Cache node modules
26+
uses: actions/cache@v1
27+
env:
28+
cache-name: cache-node-modules
29+
with:
30+
path: ~/.npm
31+
# This uses the same name as the build-action so we can share the caches.
32+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
33+
restore-keys: |
34+
${{ runner.os }}-build-${{ env.cache-name }}-
35+
${{ runner.os }}-build-
36+
${{ runner.os }}-
37+
- run: npm ci --ignore-scripts
38+
- name: npm build and test
39+
run: npm test

0 commit comments

Comments
 (0)