Schema Compatibility Check — ParadeDB v0.0.0 #27
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
| # workflows/schema-compat.yml | |
| # | |
| # Schema Compatibility Check | |
| # Validates that the django-paradedb API wrapper stays in sync with the | |
| # ParadeDB SQL schema and that integration tests pass against the new version. | |
| # Triggered automatically on each paradedb release (via repository_dispatch) | |
| # or manually via workflow_dispatch. | |
| name: Schema Compatibility Check | |
| run-name: "Schema Compatibility Check — ParadeDB v${{ inputs.version || github.event.client_payload.version }}" | |
| on: | |
| repository_dispatch: | |
| types: [paradedb-release] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "ParadeDB version to check against" | |
| required: true | |
| concurrency: | |
| group: schema-compat-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PARADEDB_VERSION: ${{ inputs.version || github.event.client_payload.version }} | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| schema-compat: | |
| name: Check Schema Compatibility | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv venv --python "3.13" | |
| uv sync --extra dev | |
| - name: Run Schema Compatibility Check | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: uv run --no-sync python scripts/check_schema_compat.py ${{ env.PARADEDB_VERSION }} | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| services: | |
| paradedb: | |
| image: paradedb/paradedb:${{ inputs.version || github.event.client_payload.version }}-pg18 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres -d postgres" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 12 | |
| env: | |
| PARADEDB_TEST_DSN: postgresql://postgres:postgres@localhost:5432/postgres | |
| PGPASSWORD: postgres | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres | |
| PYTHONPATH: ${{ github.workspace }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv venv --python "3.13" | |
| uv sync --extra dev | |
| - name: Run unit tests | |
| run: uv run --no-sync pytest -m "not integration" --cov=paradedb | |
| - name: Run integration tests | |
| run: uv run --no-sync pytest -m integration --cov=paradedb --cov-append | |
| notify: | |
| name: Notify on Failure | |
| runs-on: ubuntu-latest | |
| needs: [schema-compat, integration-tests] | |
| if: failure() | |
| steps: | |
| - name: Create GitHub Issue | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh issue create \ | |
| --repo ${{ github.repository }} \ | |
| --title "Schema compat failure for ParadeDB v${{ env.PARADEDB_VERSION }}" \ | |
| --body "$(cat <<EOF | |
| The schema compatibility check or integration tests failed against ParadeDB **v${{ env.PARADEDB_VERSION }}**. | |
| **Workflow run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| Please investigate and update django-paradedb as needed. | |
| EOF | |
| )" \ | |
| --label bug |