docs: unify CLMS filenaming doc names and title pattern #23
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: Validate Workflows & Scripts | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| - test | |
| - main | |
| push: | |
| branches: | |
| - 'test-**' | |
| - 'feature/**' | |
| - 'develop' | |
| paths: | |
| - '.github/workflows/**' | |
| - '.github/scripts/**' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| validate: | |
| name: Validate Changes | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Validate workflow YAML syntax | |
| run: | | |
| echo "π Validating workflow files..." | |
| docker run --rm -v "$PWD:/repo" -w /repo \ | |
| rhysd/actionlint:1.7.12 \ | |
| -color \ | |
| .github/workflows/*.yml | |
| echo "β All workflow files have valid syntax" | |
| - name: Validate Python syntax | |
| run: | | |
| echo "π Checking Python syntax..." | |
| for script in .github/scripts/build/*.py .github/scripts/ai/*.py .github/scripts/ai/tasks/*.py .github/scripts/helpers/*.py .github/scripts/qmd-tools/*.py .github/scripts/*.py; do | |
| if [ -f "$script" ]; then | |
| echo " β’ $script" | |
| python -m py_compile "$script" | |
| fi | |
| done | |
| echo "β All Python scripts have valid syntax" | |
| - name: Lint Python with ruff | |
| run: | | |
| echo "π Running ruff..." | |
| pip install --quiet ruff | |
| # Lint every .py under .github/scripts/ - fails the job on any issue. | |
| # Style-only (no auto-fix). Rules come from ruff.toml, not ruff's | |
| # defaults, which move between releases. | |
| ruff check .github/scripts/ | |
| echo "β ruff passed" | |
| - name: Validation summary | |
| if: success() | |
| run: | | |
| echo "" | |
| echo "βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ" | |
| echo "β All validation checks passed!" | |
| echo "βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ" | |
| echo "" | |
| echo "Validated:" | |
| echo " β’ Workflow YAML syntax (actionlint)" | |
| echo " β’ Python script syntax (py_compile)" | |
| echo "" | |
| - name: Validation failed | |
| if: failure() | |
| run: | | |
| echo "" | |
| echo "βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ" | |
| echo "β Validation failed!" | |
| echo "βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ" | |
| exit 1 |