From c07ea5f93f297707ca2079649a9e7ef87d6b9443 Mon Sep 17 00:00:00 2001 From: Amantux Date: Mon, 20 Jul 2026 16:24:50 +0000 Subject: [PATCH] Add yamllint to the workflow-validation CI job (Phase 4 #G) Extend cicd-workflow-validate beyond a bare PyYAML parse to catch real YAML errors (bad indentation, duplicate keys, tab/space issues) in the CI workflows. .yamllint uses a relaxed config: line-length and document-start disabled and the GitHub Actions `on:` truthy false-positive allowed, so it flags genuine errors without churning the existing (valid) workflows. Verified clean against all current workflows. Follow-ups (#G): actionlint + shellcheck for run: scripts, pin actions to commit SHAs, minimal per-job permissions. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_012K5Zjc2bggcyJtFbz2D4Pw --- .github/workflows/ci.yml | 4 +++- .yamllint | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .yamllint diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9c7168..ecb65a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -214,7 +214,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.12" - - run: python -m pip install --upgrade pip pyyaml + - run: python -m pip install --upgrade pip pyyaml yamllint - name: Validate workflow YAML syntax run: | python - <<'PY' @@ -226,6 +226,8 @@ jobs: yaml.safe_load(handle) print("Workflow YAML validation passed.") PY + - name: yamllint workflows (real YAML errors — see .yamllint) + run: yamllint -c .yamllint .github/workflows/ # Single always-running aggregation gate. Make THIS the only required # branch-protection check (plus operability-gate). It understands a valid diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..4c49a6a --- /dev/null +++ b/.yamllint @@ -0,0 +1,9 @@ +# yamllint config for OpenBlade — catches real YAML errors (syntax, duplicate keys, +# bad indentation) without flagging harmless style. Applied to CI workflows. +extends: default +rules: + line-length: disable # workflow run: lines are legitimately long + document-start: disable # GitHub workflows do not use '---' + comments-indentation: disable + truthy: + check-keys: false # allow the GitHub Actions 'on:' key