Skip to content

Commit

Permalink
test: on pg 12, 13, 14, 15, 16
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-chavez committed Dec 4, 2023
1 parent dad81d4 commit 5f50f03
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
name: CI

on: [push]
on: [push, pull_request]

jobs:
test:

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
14 changes: 10 additions & 4 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/plmustache.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
#include <funcapi.h>
#include <catalog/pg_proc.h>
#include <catalog/pg_type.h>
#include <access/htup_details.h>

#include <mustach/mustach.h>

#include <errno.h>

PG_MODULE_MAGIC;

#define IMPLICIT_ITERATOR "."
Expand Down

0 comments on commit 5f50f03

Please sign in to comment.