fix(release): stabilize qualification on configured hosts #987
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: PostgreSQL Integration | |
| # The Python Tests coverage job runs without PostgreSQL, so the provider-backed | |
| # integration suites skip there. This workflow qualifies the same commit against | |
| # a disposable PostgreSQL server: the ladder row reports `unverified` when the | |
| # URL is missing and the service suite is asserted by name, so a silent skip | |
| # cannot pass. Two real-server suites take about half a minute; the job stays | |
| # well below the repository's average CI job duration. | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/postgresql-integration.yml" | |
| - "loopx/control_plane/**" | |
| - "tests/control_plane_ts/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/postgresql-integration.yml" | |
| - "loopx/control_plane/**" | |
| - "tests/control_plane_ts/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: postgresql-integration-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| postgresql-authority: | |
| name: postgresql-authority (real server) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| services: | |
| postgres: | |
| image: postgres:16.15 | |
| env: | |
| POSTGRES_USER: loopx | |
| POSTGRES_PASSWORD: loopx | |
| POSTGRES_DB: loopx_store | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U loopx -d loopx_store" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 12 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Set up the qualified Node.js runtime | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22.22.3" | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install locked dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Create the disposable service database | |
| env: | |
| PGPASSWORD: loopx | |
| run: >- | |
| psql --host 127.0.0.1 --username loopx --dbname postgres | |
| --set ON_ERROR_STOP=1 --command "CREATE DATABASE loopx_service" | |
| - name: Qualify the PostgreSQL store conformance ladder row | |
| env: | |
| LOOPX_TEST_POSTGRES_URL: postgresql://loopx:loopx@127.0.0.1:5432/loopx_store | |
| run: >- | |
| python3 -m loopx.control_plane.testing.authority_e2e_ladder | |
| --row s2b.postgresql_conformance_live | |
| --report-json postgresql-conformance-report.json | |
| - name: Assert the service admission suite is available | |
| run: | | |
| set -euo pipefail | |
| node -e 'const scripts = require("./package.json").scripts; if (!scripts["test:postgresql-authority-service"]) { console.error("package.json must expose test:postgresql-authority-service: the service admission path has no CI qualification without it"); process.exit(1); }' | |
| - name: Qualify the PostgreSQL service admission path | |
| env: | |
| LOOPX_TEST_POSTGRES_SERVICE_URL: postgresql://loopx:loopx@127.0.0.1:5432/loopx_service | |
| LOOPX_TEST_POSTGRES_URL: postgresql://loopx:loopx@127.0.0.1:5432/loopx_store | |
| run: | | |
| set -euo pipefail | |
| npm run test:postgresql-authority-service 2>&1 | tee postgresql-service-admission.log | |
| grep -Fq "PostgreSQL service admits an authorized tenant and rotates a restored incarnation" postgresql-service-admission.log | |
| - name: Upload bounded PostgreSQL qualification evidence | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: postgresql-conformance-report | |
| path: | | |
| postgresql-conformance-report.json | |
| postgresql-service-admission.log | |
| if-no-files-found: ignore | |
| retention-days: 7 |