Skip to content

Commit c8005bb

Browse files
committed
ci: 🛠 lint and type checking 工作流
1 parent 670121b commit c8005bb

File tree

2 files changed

+54
-36
lines changed

2 files changed

+54
-36
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Lint and type checking
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint-and-type-checking-install:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v4
19+
20+
- name: Cache pnpm store
21+
id: cache
22+
uses: actions/cache@v3
23+
with:
24+
path: ~/.pnpm-store
25+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
26+
restore-keys: |
27+
${{ runner.os }}-pnpm-
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
lint-check:
33+
needs: lint-and-type-checking-install
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
41+
- name: Run lint check
42+
run: npm run lint:eslint
43+
44+
type-check:
45+
needs: lint-and-type-checking-install
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
with:
51+
fetch-depth: 0
52+
53+
- name: Run type check
54+
run: npm run type:check

.github/workflows/lint-check.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)