feat: add 10 government data sources from Langfuse user demand analysis #29
Workflow file for this run
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 Data Sources | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, ready_for_review, reopened] | |
| paths: | |
| - "firstdata/sources/**/*.json" | |
| - "firstdata/schemas/datasource-schema.json" | |
| jobs: | |
| protect-schema: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Block schema modifications | |
| run: | | |
| if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "firstdata/schemas/datasource-schema.json"; then | |
| echo "❌ PRs must not modify firstdata/schemas/datasource-schema.json" | |
| echo "Schema changes require direct commit to main by a maintainer." | |
| exit 1 | |
| fi | |
| validate: | |
| needs: protect-schema | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Validate all source JSON files | |
| run: | | |
| find firstdata/sources -name "*.json" | xargs uv run check-jsonschema \ | |
| --schemafile firstdata/schemas/datasource-schema.json | |
| - name: Check for duplicate IDs | |
| run: uv run python scripts/check_ids.py |