-
Notifications
You must be signed in to change notification settings - Fork 28
44 lines (36 loc) · 986 Bytes
/
main.yaml
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
41
42
43
44
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Install node v${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Restore pnpm's global store
uses: actions/cache@v2
with:
path: ~/runner/.pnpm-store/v3
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- uses: pnpm/[email protected]
with:
version: 6.0.2
run_install: |
- args: [--frozen-lockfile, --reporter=silent]
- name: Lint
run: pnpm run lint
- name: Build dist
run: pnpm run build
- name: Run tests
run: pnpm test