Skip to content

Expand CI matrix of PG versions and add direct SSL test#3693

Merged
brianc merged 3 commits into
brianc:masterfrom
sehrope:ci-pg-matrix-and-ssl-direct-tests
Jun 19, 2026
Merged

Expand CI matrix of PG versions and add direct SSL test#3693
brianc merged 3 commits into
brianc:masterfrom
sehrope:ci-pg-matrix-and-ssl-direct-tests

Conversation

@sehrope

@sehrope sehrope commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

First commit removes the os block from the GHA matrix. It's not actually used as we always run on ubuntu-latest. I think it may be left over from when we thought we were running on Windows / MacOS but actually were not.

Second updates the CI matrix to test against multiple PG versions. The original matrix of nodes versions is only tested against v18. But the latest node version is tested against v12 to v18. Uses some YAML anchors so we only have to update the latest node / PG versions in one place too.

image

RE: #3690, figure if we're going to say the driver supports older versions we should test them out too. It doesn't go all the way back till v8.4 though as the container images for ghcr.io/railwayapp-templates/postgres-ssl only go to v13. We'd have to switch back to the "official" docker hub postgres images without SSL for older versions. Might be worth doing but left it out for now (I think we could do it by just having the image name, and not just the version, in the matrix).

Finally last commit adds a test for direct SSL negotiation. It only runs in the pure JS driver against server v17+ (the min version its available). The test checks client.connection.stream.alpnProtocol to verify how we're connected.

RE: the server matrix, a while back I got a JSON endpoint added to the postgresql website that lists out the latest server versions in a machine readable JSON response: https://www.postgresql.org/versions.json Was going to make this all dynamic based on that version list (i.e. something like pick versions >= X) but I like it being explicit in the CI matrix. Makes it a bit easier to reason about what's actually being tested and we'd run into issues if the latest version does not have working containers yet. So best to keep it manual.

sehrope added 3 commits June 18, 2026 11:43
Adds testing of historical postgres versions from 13 to 18 to the
GitHub Actions CI matrix. They are each tested with the latest node
version. Older node versions are only tested against the latest
postgresql server version.

Both the stable server version and latest node version are defined
as YAML anchors to allow updating them in a single place in the future.

For v18+ the container requires an explicit PGDATA directory parent
path so we add that as well. This applies to older versions too but
should not be an issue.
@brianc

brianc commented Jun 19, 2026

Copy link
Copy Markdown
Owner

ohhh yes this is amazing!! TY! ❤️

@brianc brianc merged commit d7175a4 into brianc:master Jun 19, 2026
12 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.

2 participants