Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 7, 2022
1 parent 972de31 commit 34b6290
Showing 1 changed file with 60 additions and 11 deletions.
71 changes: 60 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: CI

on:
push:
Expand All @@ -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:
Expand All @@ -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: |
Expand All @@ -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

Expand Down

0 comments on commit 34b6290

Please sign in to comment.