From d961e90d472178c1cddd5a2b9d9bdc9cfd0041b7 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 21 Mar 2022 14:22:42 +0800 Subject: [PATCH] chore: add unit test github action steps (#516) Signed-off-by: Ryan Wang --- .github/workflows/main.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eaab2790..b71a4239 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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