# 错误：在流程中未找到必需的检查项 'ci / test (node-16)'。该检查项必须在仓库的工作流配置中定义。

- **ID:** `cicd/github-actions-required-check-not-found`
- **领域:** cicd
- **类别:** config_error
- **错误码:** `REQUIRED_CHECK_NOT_FOUND`
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

分支保护规则中配置的必需状态检查引用了当前工作流文件中不存在的检查名称，通常是因为重命名了任务或更改了工作流文件名。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| GitHub Actions | active | — | — |
| GitHub Enterprise Server 3.8 | active | — | — |
| GitHub.com (2024) | active | — | — |

## 解决方案

1. ```
   Update the branch protection rule to use the correct check name: Go to Settings > Branches > Edit protection rule for the branch, and update the 'Status checks found in last week for this repository' list with the correct job name.
   ```
2. ```
   Rename the job in the workflow file to match the required check name exactly, including matrix strategy labels.
   ```
3. ```
   Temporarily disable the required check in branch protection to allow merging, then correct the workflow and re-enable the check.
   ```

## 无效尝试

- **** — The branch protection rule is static and must be updated manually to match the workflow. (90% 失败率)
- **** — Branch protection rules apply to all branches matching a pattern, not to individual branches. (85% 失败率)
- **** — The required check name must exactly match the job name in the workflow, including matrix axes. (80% 失败率)
