Expand CI matrix of PG versions and add direct SSL test#3693
Merged
Conversation
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.
Owner
|
ohhh yes this is amazing!! TY! ❤️ |
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.
First commit removes the
osblock from the GHA matrix. It's not actually used as we always run onubuntu-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.
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-sslonly 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.alpnProtocolto 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.