fix(ci): 修复 CI/CD 工作流问题
- fix: release.yml typecheck 脚本名 compile → typecheck(发版阻断 bug) - perf: CI 测试改用 test:coverage 生成覆盖率报告 - refactor: Release 复用 CI 工作流(workflow_call),消除重复 Job - feat: Release 新增 Firefox/Chrome zip 产物验证步骤 - fix: 补全 lint-staged 配置,修复 pre-commit hook 失效问题 - feat: 添加 Dependabot 自动依赖更新配置 - fix: 添加 @vitest/coverage-v8 依赖(覆盖率所需) - fix: 改用 npx 直接调用命令,规避 npm PATH 问题
This commit is contained in:
@@ -23,13 +23,12 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Run ESLint
|
||||
run: npm run lint
|
||||
run: npx eslint . --max-warnings=0
|
||||
|
||||
typecheck:
|
||||
name: TypeScript Check
|
||||
@@ -42,13 +41,12 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Run TypeScript type check
|
||||
run: npm run typecheck
|
||||
run: npx tsc --noEmit
|
||||
|
||||
test:
|
||||
name: Unit Tests
|
||||
@@ -61,13 +59,12 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: npm run test:coverage
|
||||
run: npx vitest run --coverage
|
||||
|
||||
build:
|
||||
name: Build (${{ matrix.browser }})
|
||||
@@ -85,11 +82,10 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Build (Chrome)
|
||||
if: matrix.browser == 'chrome'
|
||||
run: npm run build
|
||||
run: npx wxt build
|
||||
|
||||
@@ -26,16 +26,15 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Package Chrome extension
|
||||
run: npm run zip
|
||||
run: npx wxt zip
|
||||
|
||||
- name: Package Firefox extension
|
||||
run: npm run zip:firefox
|
||||
run: npx wxt zip -b firefox
|
||||
|
||||
- name: Find zip artifacts
|
||||
id: find_zips
|
||||
|
||||
Reference in New Issue
Block a user