Add CI job running the tests against a real PostgreSQL service - #9
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing
buildjob 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-postgresjob 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
buildjob 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
todotable 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?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
What to Check
Verify that the following are valid
Other Information