ci: test against PostgreSQL 18
This commit is contained in:
@@ -69,7 +69,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
pgVersion: [14, 15, 16, 17]
|
||||
pgVersion: [14, 15, 16, 17, 18]
|
||||
name: PG ${{ matrix.pgVersion }}
|
||||
runs-on: ubuntu-24.04
|
||||
defaults:
|
||||
|
||||
@@ -52,6 +52,7 @@ let
|
||||
|
||||
postgresqlVersions =
|
||||
[
|
||||
{ name = "pg-18"; postgresql = pkgs.postgresql_18.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
||||
{ name = "pg-17"; postgresql = pkgs.postgresql_17.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
||||
{ name = "pg-16"; postgresql = pkgs.postgresql_16.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
||||
{ name = "pg-15"; postgresql = pkgs.postgresql_15.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
|
||||
|
||||
+3
-3
@@ -95,9 +95,9 @@ postgrest-hsie-graph-modules postgrest-with-pg-14
|
||||
postgrest-hsie-graph-symbols postgrest-with-pg-15
|
||||
postgrest-hsie-minimal-imports postgrest-with-pg-16
|
||||
postgrest-lint postgrest-with-pg-17
|
||||
postgrest-loadtest postgrest-with-slow-pg
|
||||
postgrest-loadtest-against postgrest-with-slow-postgrest
|
||||
postgrest-loadtest-report
|
||||
postgrest-loadtest postgrest-with-pg-18
|
||||
postgrest-loadtest-against postgrest-with-slow-pg
|
||||
postgrest-loadtest-report postgrest-with-slow-postgrest
|
||||
postgrest-nixpkgs-upgrade
|
||||
...
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ module PostgREST.Config.PgVersion
|
||||
, minimumPgVersion
|
||||
, pgVersion150
|
||||
, pgVersion170
|
||||
, pgVersion180
|
||||
) where
|
||||
|
||||
import qualified Data.Aeson as JSON
|
||||
@@ -34,3 +35,6 @@ pgVersion150 = PgVersion 150000 "15.0" "15.0"
|
||||
|
||||
pgVersion170 :: PgVersion
|
||||
pgVersion170 = PgVersion 170000 "17.0" "17.0"
|
||||
|
||||
pgVersion180 :: PgVersion
|
||||
pgVersion180 = PgVersion 180000 "18.0" "18.0"
|
||||
|
||||
@@ -11,11 +11,13 @@ import Test.Hspec.Wai
|
||||
import Test.Hspec.Wai.JSON
|
||||
import Text.Heredoc
|
||||
|
||||
import PostgREST.Config.PgVersion (PgVersion, pgVersion180)
|
||||
|
||||
import Protolude hiding (get)
|
||||
import SpecHelper
|
||||
|
||||
spec :: SpecWith ((), Application)
|
||||
spec =
|
||||
spec :: PgVersion -> SpecWith ((), Application)
|
||||
spec actualPgVersion =
|
||||
describe "remote procedure call" $ do
|
||||
context "a proc that returns a set" $ do
|
||||
context "returns paginated results" $ do
|
||||
@@ -1445,10 +1447,13 @@ spec =
|
||||
let auth = authHeaderJWT "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoicG9zdGdyZXN0X3Rlc3Rfc3VwZXJ1c2VyIiwiaWQiOiJqZG9lIn0.LQ-qx0ArBnfkwQQhIHKF5cS-lzl0gnTPI8NLoPbL5Fg" in
|
||||
it "should return http status 500" $
|
||||
request methodGet "/rpc/temp_file_limit" [auth] "" `shouldRespondWith`
|
||||
[json|{"code":"53400","message":"temporary file size exceeds temp_file_limit (1kB)","details":null,"hint":null}|]
|
||||
(if actualPgVersion < pgVersion180 then
|
||||
[json|{"code":"53400","message":"temporary file size exceeds temp_file_limit (1kB)","details":null,"hint":null}|]
|
||||
else
|
||||
[json|{"code":"53400","message":"temporary file size exceeds \"temp_file_limit\" (1kB)","details":null,"hint":null}|]
|
||||
)
|
||||
{ matchStatus = 500
|
||||
, matchHeaders = [ "Content-Length" <:> "105"
|
||||
, matchContentTypeJson ]
|
||||
, matchHeaders = [ matchContentTypeJson ]
|
||||
}
|
||||
|
||||
context "test table valued function with filter" $ do
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@ main = do
|
||||
, ("Feature.Query.QuerySpec" , Feature.Query.QuerySpec.spec)
|
||||
, ("Feature.Query.RawOutputTypesSpec" , Feature.Query.RawOutputTypesSpec.spec)
|
||||
, ("Feature.Query.RelatedQueriesSpec" , Feature.Query.RelatedQueriesSpec.spec)
|
||||
, ("Feature.Query.RpcSpec" , Feature.Query.RpcSpec.spec)
|
||||
, ("Feature.Query.RpcSpec" , Feature.Query.RpcSpec.spec actualPgVersion)
|
||||
, ("Feature.Query.SingularSpec" , Feature.Query.SingularSpec.spec)
|
||||
, ("Feature.Query.SpreadQueriesSpec" , Feature.Query.SpreadQueriesSpec.spec)
|
||||
, ("Feature.Query.UpdateSpec" , Feature.Query.UpdateSpec.spec)
|
||||
|
||||
Reference in New Issue
Block a user