|
| 1 | +name: governance-artifacts-ci |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - 'docs/schemas/**' |
| 7 | + - 'docs/reports/ENTERPRISE_CIVILIZATIONAL_AGI_ASI_BLUEPRINT_2026_2030.md' |
| 8 | + - '.github/workflows/governance-artifacts-ci.yml' |
| 9 | + - 'Makefile' |
| 10 | + - '.yamllint' |
| 11 | + pull_request: |
| 12 | + paths: |
| 13 | + - 'docs/schemas/**' |
| 14 | + - 'docs/reports/ENTERPRISE_CIVILIZATIONAL_AGI_ASI_BLUEPRINT_2026_2030.md' |
| 15 | + - '.github/workflows/governance-artifacts-ci.yml' |
| 16 | + - 'Makefile' |
| 17 | + - '.yamllint' |
| 18 | +name: Governance Artifacts CI |
| 19 | + |
| 20 | +on: |
| 21 | + pull_request: |
| 22 | + paths: |
| 23 | + - 'ENTERPRISE_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md' |
| 24 | + - 'governance_blueprint/**' |
| 25 | + - '.github/workflows/governance-artifacts-ci.yml' |
| 26 | + push: |
| 27 | + branches: [ main, master ] |
| 28 | + paths: |
| 29 | + - 'ENTERPRISE_AGI_ASI_GOVERNANCE_BLUEPRINT_2026_2030.md' |
| 30 | + - 'governance_blueprint/**' |
| 31 | + - '.github/workflows/governance-artifacts-ci.yml' |
| 32 | + |
| 33 | +jobs: |
| 34 | + validate-governance-artifacts: |
| 35 | + runs-on: ubuntu-latest |
| 36 | + permissions: |
| 37 | + contents: read |
| 38 | + env: |
| 39 | + PYTHONUNBUFFERED: '1' |
| 40 | + timeout-minutes: 10 |
| 41 | + |
| 42 | + steps: |
| 43 | + - name: Checkout |
| 44 | + uses: actions/checkout@v4 |
| 45 | + |
| 46 | + - name: Set up Python |
| 47 | + uses: actions/setup-python@v5 |
| 48 | + with: |
| 49 | + python-version: '3.12' |
| 50 | + cache: 'pip' |
| 51 | + cache-dependency-path: docs/schemas/requirements-governance.txt |
| 52 | + |
| 53 | + - name: Install Python deps (pinned) |
| 54 | + run: | |
| 55 | + python -m pip install --upgrade pip |
| 56 | + pip install -r docs/schemas/requirements-governance.txt |
| 57 | +
|
| 58 | + - name: Validate governance YAML/JSON artifacts |
| 59 | + run: make governance-validate |
| 60 | + |
| 61 | + - name: Setup OPA (pinned) |
| 62 | + uses: open-policy-agent/setup-opa@v2 |
| 63 | + with: |
| 64 | + version: v1.15.2 |
| 65 | + |
| 66 | + - name: Rego format and tests |
| 67 | + run: make governance-policy-test |
| 68 | + |
| 69 | + - name: Validator and evidence bundle unit tests |
| 70 | + run: make governance-validator-test |
| 71 | + |
| 72 | + - name: Build evidence manifest |
| 73 | + run: make governance-evidence-manifest |
| 74 | + |
| 75 | + - name: Verify evidence manifest integrity |
| 76 | + run: make governance-evidence-verify |
| 77 | + |
| 78 | + - name: Validate evidence manifest schema |
| 79 | + run: make governance-evidence-schema |
| 80 | + |
| 81 | + - name: Generate machine-readable validation report |
| 82 | + run: make governance-report |
| 83 | + |
| 84 | + - name: Validate run report schema |
| 85 | + run: make governance-report-schema |
| 86 | + |
| 87 | + - name: Check generated artifacts are up to date |
| 88 | + run: make governance-check-generated |
| 89 | + - name: Setup Python |
| 90 | + uses: actions/setup-python@v5 |
| 91 | + with: |
| 92 | + python-version: '3.11' |
| 93 | + |
| 94 | + - name: Run governance validation suite |
| 95 | + run: python3 governance_blueprint/validation/run_validation_suite.py --quiet --json-report governance-artifact-validation-report.json --suite-report governance-validation-suite-report.json |
| 96 | + |
| 97 | + - name: Show validation report |
| 98 | + run: | |
| 99 | + cat governance-artifact-validation-report.json |
| 100 | + cat governance-validation-suite-report.json |
| 101 | +
|
| 102 | + - name: Upload validation report |
| 103 | + uses: actions/upload-artifact@v4 |
| 104 | + with: |
| 105 | + name: governance-validation-report |
| 106 | + path: docs/schemas/validation_run_report.json |
| 107 | + name: governance-validation-reports |
| 108 | + path: | |
| 109 | + governance-artifact-validation-report.json |
| 110 | + governance-validation-suite-report.json |
0 commit comments