Skip to content

Add CI job running the tests against a real PostgreSQL service - #9

Merged
Julien Dubois (jdubois) merged 1 commit into
masterfrom
ci-postgres-service
Sep 7, 2026
Merged

Julien Dubois (jdubois) merged 1 commit into
masterfrom
ci-postgres-service

Conversation

@jdubois

Copy link
Copy Markdown
Contributor

The existing build job runs the suite against in-memory H2, so the org.postgresql:r2dbc-postgresql driver the sample actually ships with is never exercised in CI. A driver-level regression would go unnoticed.

Adds a build-postgres job that reruns the same tests against a postgres:16 service container, overriding only the connection settings via environment variables (OS env outranks application.properties in Spring Boot's property order, so no code or test changes are needed).

The build job is left untouched so its check name is unchanged and any branch protection rules keep working.

Verified locally against a postgres:16 container matching the service block: 5/5 tests pass and schema.sql creates the todo table on PostgreSQL. Confirmed the override actually takes effect by pointing the URL at a dead port, which fails all 5 tests rather than silently falling back to H2.

Purpose

  • ...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

The existing `build` job runs the suite against in-memory H2, so the
org.postgresql:r2dbc-postgresql driver the sample actually ships with is
never exercised in CI. A driver-level regression would go unnoticed.

Adds a `build-postgres` job that reruns the same tests against a
postgres:16 service container, overriding only the connection settings via
environment variables (OS env outranks application.properties in Spring
Boot's property order, so no code or test changes are needed).

The `build` job is left untouched so its check name is unchanged and any
branch protection rules keep working.

Verified locally against a postgres:16 container matching the service
block: 5/5 tests pass and schema.sql creates the `todo` table on
PostgreSQL. Confirmed the override actually takes effect by pointing the
URL at a dead port, which fails all 5 tests rather than silently falling
back to H2.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1427cea2-8234-45b7-8b01-c6ad27a39450
@jdubois
Julien Dubois (jdubois) merged commit 45240b9 into master Sep 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant