99 lines
4.2 KiB
YAML
99 lines
4.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
PYTHONIOENCODING: utf-8
|
|
PYTHONUTF8: "1"
|
|
|
|
jobs:
|
|
validate:
|
|
name: Lint & Verify (${{ matrix.os }}, Python ${{ matrix.python-version }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
python-version: ["3.11", "3.12"]
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
env:
|
|
GIT_CONFIG_COUNT: "1"
|
|
GIT_CONFIG_KEY_0: "core.autocrlf"
|
|
GIT_CONFIG_VALUE_0: "false"
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Verify accessible SVG contract
|
|
id: a11y
|
|
run: python scripts/test-lint-a11y.py
|
|
|
|
- name: Verify URL SVG normalization
|
|
id: url_icons
|
|
run: python scripts/test-build-icons-quoted-attributes.py
|
|
|
|
- name: Verify Devicon normalization
|
|
id: devicon
|
|
run: python scripts/test-build-icons-devicon.py
|
|
|
|
- name: Verify mojibake repair utility
|
|
id: mojibake
|
|
run: python scripts/test-fix-mojibake.py
|
|
|
|
- name: Run skin linter
|
|
id: skin
|
|
run: python scripts/lint-skin.py --all --baseline
|
|
|
|
- name: Verify sequence OAuth specs
|
|
id: oauth
|
|
run: python scripts/verify-sequence-oauth.py
|
|
|
|
- name: Verify draw.io import script
|
|
id: drawio
|
|
run: python scripts/verify-drawio-import.py
|
|
|
|
- name: Verify Mermaid import script
|
|
id: mermaid
|
|
run: python scripts/verify-mermaid-import.py
|
|
|
|
- name: Verify generated icon assets
|
|
id: icons
|
|
shell: bash
|
|
run: |
|
|
python scripts/build-icons.py
|
|
git diff --ignore-space-at-eol --exit-code -- \
|
|
skills/diagram-design/assets/icons.html \
|
|
skills/diagram-design/references/primitive-icons.md
|
|
|
|
- name: Generate CI execution summary table
|
|
if: always()
|
|
shell: bash
|
|
run: |
|
|
echo "### 📊 CI Verification Summary (${{ matrix.os }}, Python ${{ matrix.python-version }})" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Verification Gate | Outcome |" >> $GITHUB_STEP_SUMMARY
|
|
echo "|---|---|" >> $GITHUB_STEP_SUMMARY
|
|
echo "| SVG Accessibility Contract | ${{ steps.a11y.outcome == 'success' && '✅ Passed' || (steps.a11y.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| URL SVG Normalization | ${{ steps.url_icons.outcome == 'success' && '✅ Passed' || (steps.url_icons.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Devicon Normalization | ${{ steps.devicon.outcome == 'success' && '✅ Passed' || (steps.devicon.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Mojibake Repair Utility | ${{ steps.mojibake.outcome == 'success' && '✅ Passed' || (steps.mojibake.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Color Palette & Skin Linter | ${{ steps.skin.outcome == 'success' && '✅ Passed' || (steps.skin.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Sequence Diagram Grammar | ${{ steps.oauth.outcome == 'success' && '✅ Passed' || (steps.oauth.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Draw.io Import Extractor | ${{ steps.drawio.outcome == 'success' && '✅ Passed' || (steps.drawio.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Mermaid Import Extractor | ${{ steps.mermaid.outcome == 'success' && '✅ Passed' || (steps.mermaid.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Primitive Icons & Documentation | ${{ steps.icons.outcome == 'success' && '✅ Passed' || (steps.icons.outcome == 'skipped' && '⏭️ Skipped' || '❌ Failed') }} |" >> $GITHUB_STEP_SUMMARY
|