fix(ci): 修复 YAML 解析失败导致 CI 不触发
CI / test (18.x) (push) Successful in 10m12s
CI / test (20.x) (push) Successful in 10m7s
CI / test (22.x) (push) Successful in 10m8s
CI / test (24.x) (push) Successful in 10m24s

- 根因:'Run tests (coverage gate: lines >= 95%)' 未加引号,
  plain scalar 中 'coverage gate:' 的冒号被解析为嵌套 mapping,
  整个 workflow 解析失败 → push 不触发(v0.5.0 引入)
- 修复:name 加单引号;runs-on 恢复 debian-latest(runner 实际标签)
- publish.yml 同步恢复 runs-on
- 验证:两个文件 YAML 解析全部通过
This commit is contained in:
tianhao
2026-08-08 15:33:28 +08:00
parent a4a757b15b
commit 2516a3a36b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ on:
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: debian-latest
strategy: strategy:
matrix: matrix:
@@ -32,7 +32,7 @@ jobs:
- name: Lint - name: Lint
run: npm run lint run: npm run lint
- name: Run tests (coverage gate: lines >= 95%) - name: 'Run tests (coverage gate: lines >= 95%)'
run: npx jest --forceExit --maxWorkers=2 --no-cache --coverage run: npx jest --forceExit --maxWorkers=2 --no-cache --coverage
env: env:
NODE_OPTIONS: --max-old-space-size=4096 NODE_OPTIONS: --max-old-space-size=4096
+1 -1
View File
@@ -6,7 +6,7 @@ on:
jobs: jobs:
publish: publish:
runs-on: ubuntu-latest runs-on: debian-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4