chore: add unit test github action steps (#516)

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/548/head
Ryan Wang 2022-03-21 14:22:42 +08:00 committed by GitHub
parent 9815a30744
commit d961e90d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 5 deletions

View File

@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
node-version: [12.x, 14.x, 15.x, 16.x]
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v2
@ -36,8 +36,14 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install
- run: pnpm lint
- name: Install dependencies
run: pnpm install
- name: Run code lint check
run: pnpm lint
- name: Run unit test
run: pnpm test:unit
- name: Run typescript type check
run: pnpm typecheck
github-release:
runs-on: ubuntu-latest
@ -45,10 +51,10 @@ jobs:
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- name: Install pnpm package manager
run: npm install -g pnpm
- run: pnpm install