chore: update ci

This commit is contained in:
Anthony Fu 2022-04-07 10:21:09 +08:00
parent 972de31f29
commit 34b6290cb4

View File

@ -1,4 +1,4 @@
name: Test
name: CI
on:
push:
@ -10,7 +10,47 @@ on:
- main
jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/action-setup@v2.2.1
- name: Set node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: pnpm
- name: Install
run: pnpm install
- name: Typecheck
run: pnpm run lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/action-setup@v2.2.1
- name: Set node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: pnpm
- name: Install
run: pnpm install
- name: Typecheck
run: pnpm run typecheck
test:
runs-on: ${{ matrix.os }}
strategy:
@ -21,7 +61,25 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/action-setup@v2.2.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: pnpm
- run: pnpm install
- name: Unit Test
run: pnpm run test:unit
test-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
@ -40,15 +98,6 @@ jobs:
- run: pnpm install
- name: Lint
run: pnpm run lint
- name: Type Check
run: pnpm run typecheck
- name: Unit Test
run: pnpm run test:unit
- name: Cypress PNPM Patch
run: cp pnpm-lock.yaml package-lock.json