diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index fc9e8fd..f674bc2 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - pg: [16, 15, 14, 13, 12, 11] + pg: [17, 16, 15, 14, 13, 12] steps: - uses: actions/checkout@v4 - name: Build Image diff --git a/test/pgrx/Cargo.toml b/test/pgrx/Cargo.toml index 5ab1e93..2c8eefc 100644 --- a/test/pgrx/Cargo.toml +++ b/test/pgrx/Cargo.toml @@ -4,23 +4,23 @@ version = "0.1.0" edition = "2021" [lib] -crate-type = ["cdylib"] +crate-type = ["cdylib", "lib"] [features] -default = ["pg13"] -pg11 = ["pgrx/pg11", "pgrx-tests/pg11" ] +default = ["pg17"] pg12 = ["pgrx/pg12", "pgrx-tests/pg12" ] pg13 = ["pgrx/pg13", "pgrx-tests/pg13" ] pg14 = ["pgrx/pg14", "pgrx-tests/pg14" ] pg15 = ["pgrx/pg15", "pgrx-tests/pg15" ] pg16 = ["pgrx/pg16", "pgrx-tests/pg16" ] +pg17 = ["pgrx/pg17", "pgrx-tests/pg17" ] pg_test = [] [dependencies] -pgrx = "=0.11.4" +pgrx = "0.12.9" [dev-dependencies] -pgrx-tests = "=0.11.4" +pgrx-tests = "0.12.9" [profile.dev] panic = "unwind" diff --git a/test/pgrx/Makefile b/test/pgrx/Makefile index d670038..ef080c1 100644 --- a/test/pgrx/Makefile +++ b/test/pgrx/Makefile @@ -7,3 +7,22 @@ PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) + +.PHONY: upgrade-pgrx # Upgrade to the current version of PGRX. +upgrade-pgrx: + cargo pgrx upgrade + +.PHONY: install-pgrx # Install the version of PGRX listed in Cargo.toml +install-pgrx: Cargo.toml + cargo install cargo-pgrx --version "$$(perl -nE '/^pgrx\s+=\s"=?([^"]+)/ && do { say $$1; exit }' Cargo.toml)" --locked + +.PHONY: pgrx-init # Initialize pgrx for the PostgreSQL version identified by pg_config. +pgrx-init: Cargo.toml + @cargo pgrx init "--pg$$(perl -E 'shift =~ /(\d+)/ && say $$1' "$$($(PG_CONFIG) --version)")"="$(PG_CONFIG)" + +.PHONY: test # Run the full test suite against the PostgreSQL version identified by pg_config. +test: + @cargo test --all --no-default-features --features "pg$(PGV) pg_test" -- --nocapture + +package: + @cargo pgrx package --pg-config "$(PG_CONFIG)"