From a12a1e84e8021ecdbc443241574dee751288a77c Mon Sep 17 00:00:00 2001 From: Felipe Gutierrez Date: Wed, 21 Oct 2026 14:28:47 -0400 Subject: [PATCH] ci: run integration tests against CockroachDB; add README badges; fix sibling link --- .github/workflows/ci.yml | 21 ++++++++++++++++----- README.md | 6 +++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fef4e42..8cee45e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,20 @@ jobs: java-version: '25' cache: gradle - - name: Build - # Live-DB integration tests (*IT) are gated on a reachable CockroachDB - # node via a JUnit assumption on CRDB_URL. No node is provisioned here, - # so those tests self-skip and the build stays green. To run them in CI, - # add a CockroachDB service and set CRDB_URL for this step. + - name: Start CockroachDB + run: | + docker run -d --name crdb -p 26257:26257 \ + cockroachdb/cockroach:latest-v25.1 start-single-node --insecure + for i in $(seq 1 60); do + if docker exec crdb ./cockroach sql --insecure -e 'SELECT 1' >/dev/null 2>&1; then + echo "CockroachDB ready"; break + fi + sleep 2 + done + + - name: Build & test + # Live-DB integration tests (*IT) run against the CockroachDB node above + # via CRDB_URL; unit tests run regardless. + env: + CRDB_URL: jdbc:postgresql://localhost:26257/defaultdb?user=root&sslmode=disable run: ./gradlew build --no-daemon --stacktrace diff --git a/README.md b/README.md index 9955ee7..e25f430 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,16 @@ # CockroachDB Java Library +[![CI](https://github.com/cockroachlabs/cockroachdb-java-library/actions/workflows/ci.yml/badge.svg)](https://github.com/cockroachlabs/cockroachdb-java-library/actions/workflows/ci.yml) +[![Release](https://img.shields.io/github/v/release/cockroachlabs/cockroachdb-java-library?sort=semver)](https://github.com/cockroachlabs/cockroachdb-java-library/releases) +[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) + A **pure-Java**, framework-free library for CockroachDB. Its headline feature: custom annotations plus runtime dynamic proxies that make CockroachDB anomaly-handling boilerplate — the `try/catch` retry loops around serialization errors (SQLSTATE `40001`) — **disappear**. It is the framework-free sibling of the -[`cockroachdb-spring-boot-starter`](../cockroachdb-spring-boot-starter), and part +[`cockroachdb-spring-boot-starter`](https://github.com/cockroachlabs/cockroachdb-spring-boot-starter), and part of a family of CockroachDB client libraries (Go, Python, .NET, Ktor). Its roadmap tracks **Cockroach Continuum** (Plenum, vCluster, Aegis, and an Agent/MCP surface) — see [`docs/CONTINUUM_PLAN.md`](docs/CONTINUUM_PLAN.md).