docs(phase-3.2): add Phase 3.2 integration test plan and progress tra… #49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: README Audit & Validation [DEPRECATED] | ||
|
Check failure on line 1 in .github/workflows/readme-audit.yml
|
||
| on: | ||
| # DISABLED: Consolidated into docs-validation.yml and docs-maintenance.yml | ||
| # This workflow is deprecated and will be removed after Phase 2.3 | ||
| # See: .github/projects/active/workflows-consolidation-2026-q3/PHASE_2_2_TEST_RESULTS.md | ||
| workflow_run: | ||
| workflows: [] | ||
| workflow_dispatch: | ||
| inputs: | ||
| scope: | ||
| description: "Audit scope" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - all | ||
| - syntax | ||
| - accessibility | ||
| - contrast | ||
| - staleness | ||
| output_format: | ||
| description: "Output format" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - markdown | ||
| - json | ||
| - csv | ||
| jobs: | ||
| audit: | ||
| name: README & Mermaid Audit | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: "18" | ||
| cache: "npm" | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Run README audit | ||
| id: audit | ||
| run: | | ||
| npm run audit:readme -- \ | ||
| --scope=${{ inputs.scope }} \ | ||
| --format=${{ inputs.output_format }} \ | ||
| --output=.github/reports/mermaid-audit/ | ||
| - name: Generate audit report | ||
| if: always() | ||
| run: >- | ||
| node -e "const fs=require('fs');const sum=process.env.GITHUB_STEP_SUMMARY;const scope='${{ inputs.scope }}';const format='${{ inputs.output_format }}';let out='## README & Mermaid Audit Report\\n\\n';out+='**Scope**: '+scope+'\\n';out+='**Format**: '+format+'\\n\\n';const p='.github/reports/mermaid-audit/summary.md';if(fs.existsSync(p)){out+=fs.readFileSync(p,'utf8');}fs.appendFileSync(sum,out);" | ||
| - name: Upload audit artifacts | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: readme-audit-report | ||
| path: .github/reports/mermaid-audit/ | ||
| retention-days: 30 | ||
| - name: Create issue for critical findings | ||
| if: failure() | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| github.rest.issues.create({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| title: '🚨 Critical Findings from README Audit', | ||
| body: 'README audit workflow found critical issues. See audit report artifacts.', | ||
| labels: ['type:bug', 'area:documentation', 'priority:critical'] | ||
| }) | ||
| validate-syntax: | ||
| name: Validate Mermaid Syntax | ||
| runs-on: ubuntu-latest | ||
| if: contains(fromJson('["all", "syntax"]'), inputs.scope) | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: "18" | ||
| cache: "npm" | ||
| - name: Install Mermaid CLI | ||
| run: npm install -g @mermaid-js/mermaid-cli | ||
| - name: Validate Mermaid diagrams | ||
| run: npm run validate:mermaid-syntax | ||
| check-accessibility: | ||
| name: Check WCAG Compliance | ||
| runs-on: ubuntu-latest | ||
| if: contains(fromJson('["all", "accessibility"]'), inputs.scope) | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: "18" | ||
| cache: "npm" | ||
| - name: Check accessibility attributes | ||
| run: npm run validate:mermaid-accessibility | ||
| check-contrast: | ||
| name: Check Mermaid Colour Contrast | ||
| runs-on: ubuntu-latest | ||
| if: contains(fromJson('["all", "contrast"]'), inputs.scope) | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: "18" | ||
| cache: "npm" | ||
| - name: Check Mermaid colour contrast | ||
| run: npm run validate:mermaid-contrast | ||
| check-staleness: | ||
| name: Identify Stale Documents | ||
| runs-on: ubuntu-latest | ||
| if: contains(fromJson('["all", "staleness"]'), inputs.scope) | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Check document staleness | ||
| run: | | ||
| echo "Checking for stale README files (>6 months old)..." | ||
| # Compare last_updated in frontmatter to current date | ||
| find . -name "README.md" -type f | while read file; do | ||
| echo "Checking staleness for $file..." | ||
| done | ||
| summary: | ||
| name: Audit Summary | ||
| runs-on: ubuntu-latest | ||
| needs: [audit] | ||
| if: always() | ||
| steps: | ||
| - name: Download audit artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: readme-audit-report | ||
| path: ./reports/ | ||
| - name: Post audit results | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const fs = require('fs'); | ||
| let summary = '## README Audit Results\n\n'; | ||
| if (fs.existsSync('./reports/summary.md')) { | ||
| const content = fs.readFileSync('./reports/summary.md', 'utf8'); | ||
| summary += content; | ||
| } | ||
| github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| body: summary | ||
| }); | ||