diff --git a/.github/workflows/junit-tests.yml b/.github/workflows/junit-tests.yml index a9346da..22b9e28 100644 --- a/.github/workflows/junit-tests.yml +++ b/.github/workflows/junit-tests.yml @@ -24,3 +24,41 @@ jobs: cache: maven - name: Build with Maven run: mvn test + + # The `build` job above runs the suite against in-memory H2, which never + # exercises the PostgreSQL driver this sample actually ships with. This job + # reruns the same tests against a real PostgreSQL server so that regressions + # in the org.postgresql:r2dbc-postgresql path are caught. + build-postgres: + + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:16 + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: demo + ports: + - 5432:5432 + options: >- + --health-cmd "pg_isready -U postgres -d demo" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Set up Java + uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 + with: + java-version: 17 + distribution: temurin + cache: maven + - name: Build with Maven + run: mvn test + env: + SPRING_R2DBC_URL: r2dbc:postgresql://localhost:5432/demo + SPRING_R2DBC_USERNAME: postgres + SPRING_R2DBC_PASSWORD: postgres