Skip to content

feat: add 10 government data sources from Langfuse user demand analysis #29

feat: add 10 government data sources from Langfuse user demand analysis

feat: add 10 government data sources from Langfuse user demand analysis #29

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