Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Commit 764b29b

Browse files
committed
chore: add github action ci
1 parent 814e7df commit 764b29b

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "CI"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
ci:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [14.x, 16.x]
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Cache pnpm modules
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.pnpm-store
26+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
27+
restore-keys: |
28+
${{ runner.os }}-
29+
- uses: pnpm/action-setup@v2.0.1
30+
with:
31+
version: 6.0.2
32+
run_install: true
33+
- name: Install packages
34+
run: pnpm install --frozen-lockfile
35+
- name: Test
36+
run: pnpm test
37+
env:
38+
TZ: Asia/Shanghai
39+
- name: Check Build
40+
run: pnpm build

0 commit comments

Comments
 (0)