mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-18 01:34:00 -05:00
Add Cece System Audit to CI pipeline
Introduces automated OS health checks on every push and PR: Features: - Runs Cece audit script on push to main and claude/** branches - Runs on all PRs to main - Manual trigger support via workflow_dispatch - Fails build if CRITICAL issues found - Warns if ERROR issues found (non-blocking) - Generates GitHub step summary with audit results - Uploads full audit report as artifact (30-day retention) Checks: - Repository structure - Service registry & DNS consistency - Kernel integration - Infrastructure configs - GitHub workflows - Backend/frontend structure - Documentation completeness - Cross-references This ensures the OS stays healthy and catches regressions early.
This commit is contained in:
78
.github/workflows/cece-audit.yml
vendored
Normal file
78
.github/workflows/cece-audit.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
name: Cece System Audit
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, claude/**]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch: # Allow manual trigger
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
audit:
|
||||||
|
name: Run Cece OS Audit
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Run Cece Audit
|
||||||
|
run: |
|
||||||
|
python scripts/cece_audit.py
|
||||||
|
|
||||||
|
- name: Check for critical issues
|
||||||
|
run: |
|
||||||
|
# Run audit and capture output
|
||||||
|
output=$(python scripts/cece_audit.py)
|
||||||
|
echo "$output"
|
||||||
|
|
||||||
|
# Extract summary counts
|
||||||
|
critical=$(echo "$output" | grep "🔴 CRITICAL:" | awk '{print $3}')
|
||||||
|
errors=$(echo "$output" | grep "🟠 ERROR:" | awk '{print $3}')
|
||||||
|
|
||||||
|
# Fail if critical issues found
|
||||||
|
if [ "$critical" -gt 0 ]; then
|
||||||
|
echo "❌ CRITICAL issues found: $critical"
|
||||||
|
echo "::error::Cece audit found $critical CRITICAL issues. See audit output above."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Warn if errors found (but don't fail)
|
||||||
|
if [ "$errors" -gt 0 ]; then
|
||||||
|
echo "⚠️ ERROR issues found: $errors"
|
||||||
|
echo "::warning::Cece audit found $errors ERROR issues. See audit output above."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✅ No critical issues found"
|
||||||
|
|
||||||
|
- name: Generate audit summary
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
python scripts/cece_audit.py > audit_output.txt
|
||||||
|
|
||||||
|
# Extract summary section
|
||||||
|
awk '/📊 SUMMARY/,/^$/' audit_output.txt > summary.txt
|
||||||
|
|
||||||
|
# Create GitHub step summary
|
||||||
|
{
|
||||||
|
echo "# 🔍 Cece OS Audit Results"
|
||||||
|
echo ""
|
||||||
|
echo "\`\`\`"
|
||||||
|
cat summary.txt
|
||||||
|
echo "\`\`\`"
|
||||||
|
echo ""
|
||||||
|
echo "Full audit output available in workflow logs."
|
||||||
|
} >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
- name: Upload audit report
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: cece-audit-report
|
||||||
|
path: audit_output.txt
|
||||||
|
retention-days: 30
|
||||||
Reference in New Issue
Block a user