Skip to content

Commit 3ad1589

Browse files
committed
chore(ci): 更新 ESLint 和 TypeScript 检查流程
- 修改 ESLint 步骤以设置环境变量标记失败状态 - 修改 TypeScript 类型检查步骤以设置环境变量标记失败状态 - 更新检查摘要逻辑以使用环境变量而不是步骤结果 - 为管理端 ESLint 检查添加环境变量标记 - 调整条件判断逻辑以正确显示检查摘要信息
1 parent db427f5 commit 3ad1589

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/frontend-ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,18 @@ jobs:
7575

7676
- name: Run ESLint
7777
id: eslint
78-
run: npm run lint
78+
run: npm run lint || echo "ESLINT_FAILED=true" >> $GITHUB_ENV
7979
continue-on-error: true # ⚠️ TEMPORARY: Allow lint errors for now
8080

8181
- name: Run TypeScript type check
8282
id: typecheck
83-
run: npm run type-check
83+
run: npm run type-check || echo "TYPECHECK_FAILED=true" >> $GITHUB_ENV
8484
continue-on-error: true # ⚠️ TEMPORARY: Allow type errors for now
8585

8686
- name: Create check summary
8787
if: always()
8888
run: |
89-
if [ "${{ steps.eslint.outcome }}" != "success" ] || [ "${{ steps.typecheck.outcome }}" != "success" ]; then
89+
if [ "${ESLINT_FAILED}" == "true" ] || [ "${TYPECHECK_FAILED}" == "true" ]; then
9090
echo "## ⚠️ Frontend Lint Check Has Issues" >> $GITHUB_STEP_SUMMARY
9191
echo "" >> $GITHUB_STEP_SUMMARY
9292
echo "> **Note:** Lint errors are currently allowed to pass (temporary setting)" >> $GITHUB_STEP_SUMMARY
@@ -194,13 +194,13 @@ jobs:
194194

195195
- name: Run ESLint
196196
id: eslint
197-
run: npm run lint
197+
run: npm run lint || echo "ADMIN_ESLINT_FAILED=true" >> $GITHUB_ENV
198198
continue-on-error: true # ⚠️ TEMPORARY: Allow lint errors for now
199199

200200
- name: Create check summary
201201
if: always()
202202
run: |
203-
if [ "${{ steps.eslint.outcome }}" != "success" ]; then
203+
if [ "${ADMIN_ESLINT_FAILED}" == "true" ]; then
204204
echo "## ⚠️ Admin Lint Check Has Issues" >> $GITHUB_STEP_SUMMARY
205205
echo "" >> $GITHUB_STEP_SUMMARY
206206
echo "> **Note:** Lint errors are currently allowed to pass (temporary setting)" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)