File tree Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change 1010
1111# 定义共享的设置步骤
1212jobs :
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 :
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
10973
11074 e2e-tests :
11175 name : E2E 测试
112- needs : setup
11376 runs-on : ubuntu-latest
11477 env :
11578 CI : ' true' # 设置 CI 环境变量为 true,用于测试脚本中区分环境
You can’t perform that action at this time.
0 commit comments