Merge pull request #11 from Codewriter90x/agent/security-release-hard… #32
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: Data quality | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - "agent/**" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| data-quality: | |
| name: Data quality gate | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install pipeline dependency | |
| run: python -m pip install -r requirements.txt | |
| - name: Validate committed data and quality contracts | |
| run: python scripts/validate_dataset.py | |
| - name: Build twice and verify determinism | |
| run: python scripts/check_determinism.py | |
| - name: Validate rebuilt data and cross-format equivalence | |
| run: python scripts/validate_dataset.py | |
| - name: Run schema, integrity, coordinate and territorial tests | |
| run: python -m unittest discover -s tests -v | |
| - name: Test Pages search and map logic | |
| run: node --test tests/pages_core.test.mjs | |
| - name: Build deterministic GitHub Pages site | |
| run: python scripts/build_pages.py | |
| - name: Build versioned release assets | |
| run: python scripts/build_release.py | |
| - name: Validate versioned release assets | |
| run: python scripts/validate_release.py | |
| - name: Smoke-test release artifact upload | |
| if: github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: "Italian_Cities-release-smoke-${{ github.sha }}" | |
| path: "dist/*/*" | |
| if-no-files-found: error | |
| retention-days: 1 | |
| - name: Reject stale, divergent or manually edited artifacts | |
| run: >- | |
| git diff --exit-code -- | |
| data | |
| ":(exclude)data/italian_locations.sqlite" | |
| reports/release-diff.json | |
| reports/export-manifest.json | |
| reports/determinism.json | |
| reports/quality-validation.json |