|
| 1 | +name: Governance Artifact Validation |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + pull_request: |
| 6 | + paths: |
| 7 | + - docs/artifacts/** |
| 8 | + - docs/reports/INSTITUTIONAL_AGI_ASI_MASTER_REFERENCE_2026_2030.md |
| 9 | + - scripts/validate_governance_artifact.py |
| 10 | + - scripts/export_governance_artifact_json.py |
| 11 | + - scripts/summarize_governance_test_results.py |
| 12 | + - scripts/generate_governance_manifest.py |
| 13 | + - scripts/governance_artifact_constants.py |
| 14 | + - test_validate_governance_artifact.py |
| 15 | + - test_export_governance_artifact_json.py |
| 16 | + - test_summarize_governance_test_results.py |
| 17 | + - test_governance_artifact_integrity.py |
| 18 | + - test_generate_governance_manifest.py |
| 19 | + - requirements-dev.txt |
| 20 | + - Makefile |
| 21 | + - .github/workflows/governance-artifact-validation.yml |
| 22 | + push: |
| 23 | + branches: ["main"] |
| 24 | + paths: |
| 25 | + - docs/artifacts/** |
| 26 | + - docs/reports/INSTITUTIONAL_AGI_ASI_MASTER_REFERENCE_2026_2030.md |
| 27 | + - scripts/validate_governance_artifact.py |
| 28 | + - scripts/export_governance_artifact_json.py |
| 29 | + - scripts/summarize_governance_test_results.py |
| 30 | + - scripts/generate_governance_manifest.py |
| 31 | + - scripts/governance_artifact_constants.py |
| 32 | + - test_validate_governance_artifact.py |
| 33 | + - test_export_governance_artifact_json.py |
| 34 | + - test_summarize_governance_test_results.py |
| 35 | + - test_governance_artifact_integrity.py |
| 36 | + - test_generate_governance_manifest.py |
| 37 | + - requirements-dev.txt |
| 38 | + - Makefile |
| 39 | + - .github/workflows/governance-artifact-validation.yml |
| 40 | + |
| 41 | +permissions: |
| 42 | + contents: read |
| 43 | + |
| 44 | +concurrency: |
| 45 | + group: governance-artifact-${{ github.ref }} |
| 46 | + cancel-in-progress: true |
| 47 | + |
| 48 | +jobs: |
| 49 | + validate-governance-artifacts: |
| 50 | + runs-on: ubuntu-latest |
| 51 | + timeout-minutes: 10 |
| 52 | + steps: |
| 53 | + - name: Checkout |
| 54 | + uses: actions/checkout@v4 |
| 55 | + |
| 56 | + - name: Setup Python |
| 57 | + uses: actions/setup-python@v5 |
| 58 | + with: |
| 59 | + python-version: '3.11' |
| 60 | + cache: 'pip' |
| 61 | + cache-dependency-path: 'requirements-dev.txt' |
| 62 | + |
| 63 | + - name: Install dependencies |
| 64 | + run: pip install -r requirements-dev.txt |
| 65 | + |
| 66 | + - name: Run governance verification pipeline |
| 67 | + run: make verify-governance |
| 68 | + |
| 69 | + - name: Publish test summary |
| 70 | + if: always() |
| 71 | + run: | |
| 72 | + if [ -f artifacts/test-results/governance-tests.xml ]; then |
| 73 | + SUMMARY=$(make --no-print-directory summarize-governance-tests) |
| 74 | + echo "$SUMMARY" | tee -a "$GITHUB_STEP_SUMMARY" |
| 75 | + else |
| 76 | + echo "Governance tests summary unavailable: JUnit report not found." | tee -a "$GITHUB_STEP_SUMMARY" |
| 77 | + fi |
| 78 | +
|
| 79 | + - name: Upload governance test results |
| 80 | + if: always() && hashFiles('artifacts/test-results/governance-tests.xml') != '' |
| 81 | + uses: actions/upload-artifact@v4 |
| 82 | + with: |
| 83 | + name: governance-test-results |
| 84 | + path: artifacts/test-results/governance-tests.xml |
0 commit comments