@@ -295,12 +295,83 @@ jobs:
295295 ;;
296296 esac
297297
298+ reporting-js-interop :
299+ needs : changes
300+ if : needs.changes.outputs.run_postgres == 'true'
301+ name : Row storage interop with the JavaScript SDK (Postgres 16)
302+ runs-on : ubuntu-latest
303+ # npm ci and the full adcp-client build dominate; the interop test itself takes seconds.
304+ timeout-minutes : 30
305+ permissions :
306+ contents : read
307+ # PURPOSE: the shared row-storage layout is only shared if the shipped JavaScript SDK reads
308+ # what Python writes and the reverse, against one database and one bucket. This lane builds
309+ # adcp-client at its main branch (deliberately not pinned to a commit) and runs
310+ # test_one_database_and_one_bucket_in_both_directions with ADCP_REQUIRE_JS_INTEROP=1, so a
311+ # missing build or environment fails instead of skipping. If JavaScript main changes its
312+ # stored format before Python mirrors it, this job correctly fails: that is the gate.
313+ services :
314+ postgres :
315+ image : mirror.gcr.io/library/postgres:16
316+ env :
317+ POSTGRES_HOST_AUTH_METHOD : trust
318+ POSTGRES_DB : adcp_interop_test
319+ ports :
320+ - 5432:5432
321+ options : >-
322+ --health-cmd pg_isready
323+ --health-interval 5s
324+ --health-timeout 5s
325+ --health-retries 10
326+ steps :
327+ - uses : actions/checkout@v6
328+ - uses : actions/setup-python@v6
329+ with :
330+ python-version : " 3.12"
331+ - name : Set up uv
332+ uses : astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
333+ with :
334+ version : " 0.12.8"
335+ enable-cache : true
336+ cache-dependency-glob : pyproject.toml
337+ cache-suffix : " 3.12"
338+ prune-cache : true
339+ - name : Check out the JavaScript SDK (main)
340+ uses : actions/checkout@v6
341+ with :
342+ repository : adcontextprotocol/adcp-client
343+ ref : main
344+ path : adcp-client-js
345+ persist-credentials : false
346+ - name : Set up Node 22.12.0
347+ uses : actions/setup-node@v6
348+ with :
349+ node-version : " 22.12.0"
350+ cache : npm
351+ cache-dependency-path : adcp-client-js/package-lock.json
352+ - name : Build the JavaScript SDK
353+ working-directory : adcp-client-js
354+ run : |
355+ npm ci
356+ npm run build
357+ test -f dist/lib/reporting/ledger/index.js
358+ - name : Install test dependencies
359+ run : uv pip install --system -e ".[dev,pg]"
360+ - name : Run the interop test in both directions
361+ env :
362+ ADCP_PG_TEST_URL : postgresql://postgres@localhost:5432/adcp_interop_test
363+ ADCP_JS_SDK_DIR : ${{ github.workspace }}/adcp-client-js
364+ ADCP_REQUIRE_JS_INTEROP : " 1"
365+ run : |
366+ python -m pytest -n0 -p no:cacheprovider -v -ra \
367+ tests/conformance/reporting/test_reporting_row_storage_interop_pg.py
368+
298369 pg-conformance-required-gate :
299370 name : Postgres conformance tests (Postgres 16)
300371 runs-on : ubuntu-latest
301372 timeout-minutes : 5
302373 permissions : {}
303- needs : [changes, pg-conformance, pg-reporting-status, pg-reporting-materializer, pg-reporting-receipts, pg-reporting-receipt-compatibility, pg-reporting-feed, pg-reporting-feed-compatibility, pg-reporting-feed-installed, pg-reporting-production, pg-reporting-production-compatibility, pg-reporting-production-installed, reporting-installed-artifact-matrix]
374+ needs : [changes, pg-conformance, pg-reporting-status, pg-reporting-materializer, pg-reporting-receipts, pg-reporting-receipt-compatibility, pg-reporting-feed, pg-reporting-feed-compatibility, pg-reporting-feed-installed, pg-reporting-production, pg-reporting-production-compatibility, pg-reporting-production-installed, reporting-js-interop, reporting- installed-artifact-matrix]
304375 # Failed lanes must still fail the gate; superseded runs should release
305376 # their concurrency slot instead of keeping an uncancelable job queued.
306377 if : ${{ !cancelled() }}
0 commit comments