Skip to content

Commit 3bec452

Browse files
committed
chore: 优化ci
1 parent f13c52c commit 3bec452

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,8 @@ on:
1010

1111
# 定义共享的设置步骤
1212
jobs:
13-
setup:
14-
name: 环境设置
15-
runs-on: ubuntu-latest
16-
outputs:
17-
pnpm-store-path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
18-
steps:
19-
- name: 检出代码
20-
uses: actions/checkout@v4
21-
22-
- name: 设置 Node.js
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: '20'
26-
27-
- name: 安装 pnpm
28-
uses: pnpm/action-setup@v3
29-
id: pnpm-install
30-
with:
31-
version: 8
32-
run_install: false
33-
34-
- name: 验证 pnpm 安装
35-
run: |
36-
echo "PNPM_HOME=$PNPM_HOME"
37-
export PATH="$PNPM_HOME:$PATH"
38-
which pnpm || echo "pnpm not found in PATH"
39-
pnpm --version || echo "pnpm command failed"
40-
41-
- name: 获取 pnpm 缓存目录
42-
id: pnpm-cache
43-
shell: bash
44-
run: |
45-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
46-
4713
lint-and-check:
4814
name: 代码检查与构建测试
49-
needs: setup
5015
runs-on: ubuntu-latest
5116

5217
steps:
@@ -57,7 +22,6 @@ jobs:
5722
uses: actions/setup-node@v4
5823
with:
5924
node-version: '20'
60-
cache: 'pnpm'
6125

6226
- name: 安装 pnpm
6327
uses: pnpm/action-setup@v3
@@ -109,7 +73,6 @@ jobs:
10973

11074
e2e-tests:
11175
name: E2E 测试
112-
needs: setup
11376
runs-on: ubuntu-latest
11477
env:
11578
CI: 'true' # 设置 CI 环境变量为 true,用于测试脚本中区分环境

0 commit comments

Comments
 (0)