diff --git a/.github/workflows/examples-it.yml b/.github/workflows/examples-it.yml new file mode 100644 index 0000000..9ad12b2 --- /dev/null +++ b/.github/workflows/examples-it.yml @@ -0,0 +1,42 @@ +name: examples-it + +# Runs the Ideas Board example's integration tests on GitHub-hosted runners, +# which ship with Docker — so Testcontainers spins up a real CockroachDB and the +# tutorial's integration tests (the 40001 concurrency proof, follower reads, +# metrics, CDC) actually execute. The example installs the published packages +# from the anonymous PEP 503 feed, exactly as the tutorial/docs tell customers +# to. The semantic IT boots its own vector-index-capable CockroachDB +# (CRDB_VECTOR_IMAGE, default v26.2) via Testcontainers and runs here. The +# multi-region IT stays gated: REGIONAL BY ROW needs a multi-region cluster +# (CRDB_MULTIREGION=true), so it skips cleanly. +on: + pull_request: + paths: + - 'examples/ideas-board/**' + - '.github/workflows/examples-it.yml' + push: + branches: [main] + paths: + - 'examples/ideas-board/**' + - '.github/workflows/examples-it.yml' + workflow_dispatch: + +jobs: + ideas-board-it: + name: Ideas Board integration tests (Testcontainers) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install dependencies (published packages from the Pages feed) + working-directory: examples/ideas-board + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Integration tests (real CockroachDB via Testcontainers) + working-directory: examples/ideas-board + env: + TESTCONTAINERS_RYUK_DISABLED: "true" + run: python -m pytest -v diff --git a/examples/ideas-board/requirements.txt b/examples/ideas-board/requirements.txt index 1bb9c8a..b7114cb 100644 --- a/examples/ideas-board/requirements.txt +++ b/examples/ideas-board/requirements.txt @@ -7,7 +7,7 @@ cockroachdb==0.1.2 cockroachdb-core==0.1.2 # metrics (RetryEngine) + follower-read/region context cockroachdb-cdc==0.1.1 # changefeed handlers + webhook payload parsing -cockroachdb-ai==0.1.1 # pgvector vector store (semantic search); IT needs cockroach >= v25.2 +cockroachdb-ai==0.1.2 # pgvector vector store (semantic search); CREATE VECTOR INDEX needs cockroach >= v26.2 psycopg[binary]>=3.1 pytest>=8.0 testcontainers>=4.0 # integration tests only; boot CockroachDB in --insecure mode