element-plus/.github/workflows/test-unit.yml

67 lines
1.3 KiB
YAML
Raw Normal View History

2022-04-08 02:49:13 +08:00
name: 🧪 Unit Test
2020-07-25 23:38:24 +08:00
2020-09-01 13:27:19 +08:00
on: pull_request
2020-07-25 23:38:24 +08:00
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
2020-07-25 23:38:24 +08:00
jobs:
2022-09-14 09:50:55 +08:00
lint:
name: Lint
2020-07-25 23:38:24 +08:00
runs-on: ubuntu-latest
2020-07-25 23:38:24 +08:00
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Add dev branch
run: git branch dev origin/dev
- name: Setup pnpm
uses: pnpm/action-setup@v2
2020-08-03 18:07:29 +08:00
- name: Setup node
uses: actions/setup-node@v3
with:
2022-09-14 09:50:55 +08:00
node-version: 16
cache: 'pnpm'
2022-02-21 16:11:17 +08:00
2020-08-03 18:07:29 +08:00
- name: Install dependencies
2021-10-16 20:58:41 +08:00
run: pnpm i --frozen-lockfile
2020-08-04 10:49:49 +08:00
- name: Lint
run: pnpm lint
- name: Type Check
run: pnpm typecheck
2022-09-14 09:50:55 +08:00
build:
name: Unit Test (${{ matrix.node-name }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16']
include:
- node-version: '16'
node-name: 'Latest'
steps:
- uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Test
run: pnpm test