From 5f50f034899331a941a9dc22ef7ef7e94420fea5 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Mon, 4 Dec 2023 08:17:39 -0500 Subject: [PATCH] test: on pg 12, 13, 14, 15, 16 --- .github/workflows/ci.yaml | 18 ++++++++++-------- shell.nix | 14 ++++++++++---- src/plmustache.c | 3 +-- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e00d288..22f2200 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,6 @@ name: CI -on: [push] +on: [push, pull_request] jobs: test: @@ -8,12 +8,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - pg-version: ['15'] + pg-version: ['12', '13', '14', '15', '16'] steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v18 - with: - nix_path: nixpkgs=channel:nixos-unstable - - name: Run tests pg_${{ matrix.postgres-version }} - run: nix-shell --run "with-pg-${{ matrix.pg-version }} make installcheck" + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v18 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Run tests + run: nix-shell --run "with-pg-${{ matrix.pg-version }} make installcheck" + - if: ${{ failure() }} + run: cat output/regression.diffs diff --git a/shell.nix b/shell.nix index 2fd8ec5..5f18d1c 100644 --- a/shell.nix +++ b/shell.nix @@ -1,13 +1,19 @@ with import (builtins.fetchTarball { - name = "2022-10-14"; - url = "https://github.com/NixOS/nixpkgs/archive/cc090d2b942f76fad83faf6e9c5ed44b73ba7114.tar.gz"; - sha256 = "0a1wwpbn2f38pcays6acq1gz19vw4jadl8yd3i3cd961f1x2vdq2"; + name = "2023-09-16"; + url = "https://github.com/NixOS/nixpkgs/archive/ae5b96f3ab6aabb60809ab78c2c99f8dd51ee678.tar.gz"; + sha256 = "11fpdcj5xrmmngq0z8gsc3axambqzvyqkfk23jn3qkx9a5x56xxk"; }) {}; mkShell { buildInputs = let extensionName = "plmustache"; - supportedPgVersions = [ postgresql_15 ]; + supportedPgVersions = [ + postgresql_16 + postgresql_15 + postgresql_14 + postgresql_13 + postgresql_12 + ]; mustach = callPackage ./nix/mustach.nix {}; pgWExtension = { postgresql }: postgresql.withPackages (p: [ (callPackage ./nix/pgExtension.nix { inherit postgresql extensionName mustach; }) ]); extAll = map (x: callPackage ./nix/pgScript.nix { postgresql = pgWExtension { postgresql = x;}; }) supportedPgVersions; diff --git a/src/plmustache.c b/src/plmustache.c index d290225..fabf908 100644 --- a/src/plmustache.c +++ b/src/plmustache.c @@ -9,11 +9,10 @@ #include #include #include +#include #include -#include - PG_MODULE_MAGIC; #define IMPLICIT_ITERATOR "."