Updated category names, updated SPA routing #21
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 Schema | |
| on: | |
| pull_request: | |
| paths: | |
| - 'data/paths/**/*.yaml' | |
| - 'data/paths/**/*.yml' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'data/paths/**/*.yaml' | |
| - 'data/paths/**/*.yml' | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| pip install -r scripts/requirements.txt | |
| - name: Validate YAML files | |
| run: | | |
| python scripts/validate-schema.py data/paths/ | |
| - name: Comment on PR (on failure) | |
| if: failure() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '❌ Schema validation failed. Please check the validation errors above and fix your YAML files according to the [schema documentation](../blob/main/SCHEMA.md).' | |
| }) | |
| - name: Comment on PR (on success) | |
| if: success() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '✅ All YAML files passed schema validation!' | |
| }) |