Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CI for Coding-Dev-Tools/.github — validates reusable workflows
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run workflow validation
run: bash tests/validate-workflows.sh
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
21 changes: 21 additions & 0 deletions scripts/ci-smoke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# CI smoke test for Coding-Dev-Tools/.github reusable workflows
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
ERRORS=0
echo "=== CI Smoke Test ==="
if command -v yamllint &>/dev/null; then
yamllint "$ROOT/.github/workflows/" || ((ERRORS++))
yamllint "$ROOT/.github/workflows-pending/" || ((ERRORS++))
else
echo "[SKIP] yamllint not installed"
fi
for wf in "$ROOT"/.github/workflows/*.yml; do
name=$(basename "$wf")
if ! grep -qE '^on:| workflow_call:' "$wf" 2>/dev/null; then
echo "[FAIL] $name: missing trigger"; ((ERRORS++))
else
echo "[PASS] $name"
fi
done
echo "=== $ERRORS error(s) ==="; exit "$ERRORS"
19 changes: 19 additions & 0 deletions tests/validate-workflows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Validate reusable workflows in Coding-Dev-Tools/.github
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
P=0; F=0
check() { local d="$1"; shift; if "$@" &>/dev/null; then echo "[PASS] $d"; P=$((P+1)); else echo "[FAIL] $d"; F=$((F+1)); fi; }
echo "=== Workflow Validation ==="
for wf in python-ci auto-code-review code-review dependency-review stale pr-title-lint; do
check "Workflow $wf.yml" test -f "$ROOT/.github/workflows/$wf.yml"
done
for wf in "$ROOT"/.github/workflows/*.yml; do
check "$(basename "$wf") has trigger" grep -qE '^on:| workflow_call:' "$wf"
done
for tpl in auto-code-review caller-auto-code-review code-review; do
check "Template $tpl.yml" test -f "$ROOT/templates/workflows/$tpl.yml"
done
check "AGENTS.md" test -f "$ROOT/AGENTS.md"
check "VERSION" test -f "$ROOT/VERSION"
echo "=== $P passed, $F failed ==="; exit "$F"
Loading