GitHub Actions Step Flake Audit — GitHub Actions Step Flake 审计
v1.0.0检测 flaky GitHub Actions job steps by finding mixed 成功/失败 conclusions across 运行s.
运行时依赖
安装命令
点击复制技能文档
GitHub Actions Step Flake 审计
Use this 技能 to catch flaky CI steps that alternate between passing and fAIling across 工作流 运行s.
What this 技能 does Reads GitHub Actions 运行 JSON 导出s (gh 运行 view --json ...) Groups step outcomes by 仓库 + 工作流 + job + step name Scores each step for flake risk when 机器人h 成功 and 失败 outcomes are present Ranks the most unstable steps by 失败 rate and fAIled-运行 volume Supports text/json 输出s and optional fAIl gate for CI enforcement 输入s
Optional:
运行_GLOB (default: artifacts/github-actions/.json) TOP_N (default: 20) 输出_格式化 (text or json, default: text) MIN_OCCURRENCES (default: 3) — minimum observed step 运行s before scoring WARN_失败_RATE (default: 0.20) — flaky 失败-rate threshold CRITICAL_失败_RATE (default: 0.40) — critical flaky 失败-rate threshold FAIL_ON_CRITICAL (0 or 1, default: 0) REPO_MATCH / REPO_EXCLUDE (regex, optional) 工作流_MATCH / 工作流_EXCLUDE (regex, optional) JOB_MATCH / JOB_EXCLUDE (regex, optional) STEP_MATCH / STEP_EXCLUDE (regex, optional) Collect 运行 JSON gh 运行 view <运行-id> --json databaseId,工作流Name,headBranch,headSha,url,仓库,jobs \ > artifacts/github-actions/运行-<运行-id>.json
运行
Text 报告:
运行_GLOB='artifacts/github-actions/.json' \ MIN_OCCURRENCES=5 \ WARN_失败_RATE=0.15 \ CRITICAL_失败_RATE=0.35 \ bash 技能s/github-actions-step-flake-审计/scripts/step-flake-审计.sh
JSON 输出 + fAIl gate:
运行_GLOB='artifacts/github-actions/.json' \ 输出_格式化=json \ FAIL_ON_CRITICAL=1 \ bash 技能s/github-actions-step-flake-审计/scripts/step-flake-审计.sh
运行 agAInst bundled fixtures:
运行_GLOB='技能s/github-actions-step-flake-审计/fixtures/.json' \ bash 技能s/github-actions-step-flake-审计/scripts/step-flake-审计.sh
输出 contract Exit 0 in 报告ing mode (default) Exit 1 when FAIL_ON_CRITICAL=1 and one or more flaky step groups are critical Text mode prints summary + top flaky steps JSON mode prints summary + ranked groups + critical groups