ci: validate example configs on push. #1
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 Configuration Files | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'examples/**/*.yaml' | |
| - 'examples/**/*.yml' | |
| - 'tools/validate_config/**' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'examples/**/*.yaml' | |
| - 'examples/**/*.yml' | |
| - 'tools/validate_config/**' | |
| jobs: | |
| validate-configs: | |
| runs-on: ubuntu-latest | |
| name: Validate Imposter Configuration Files | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| cd tools/validate_config | |
| python -m venv venv | |
| source venv/bin/activate | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Validate configuration files (Current Schema) | |
| run: | | |
| cd tools/validate_config | |
| source venv/bin/activate | |
| echo "🔍 Validating configuration files against current schema..." | |
| python validate_configs.py ../../examples/ |