Skip to content

Commit cb272f3

Browse files
nix: add postgrest-with-oriole-17
1 parent c7260bd commit cb272f3

12 files changed

Lines changed: 39 additions & 18 deletions

File tree

.github/workflows/test.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
strategy:
7171
fail-fast: false
7272
matrix:
73-
pgVersion: [14, 15, 16, 17, 18]
74-
name: PG ${{ matrix.pgVersion }}
73+
pgVersion: [pg-14, pg-15, pg-16, pg-17, pg-18, oriole-17]
74+
name: ${{ matrix.pgVersion }}
7575
runs-on: ubuntu-24.04
7676
defaults:
7777
run:
@@ -84,25 +84,25 @@ jobs:
8484
uses: ./.github/actions/setup-nix
8585
with:
8686
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
87-
tools: tests.testSpec.bin tests.testObservability.bin tests.testIO.bin tests.testBigSchema.bin withTools.pg-${{ matrix.pgVersion }}.bin cabalTools.update.bin
87+
tools: tests.testSpec.bin tests.testObservability.bin tests.testIO.bin tests.testBigSchema.bin withTools.${{ matrix.pgVersion }}.bin cabalTools.update.bin
8888

8989
- run: postgrest-cabal-update
9090

9191
- name: Run spec tests
9292
if: always()
93-
run: postgrest-with-pg-${{ matrix.pgVersion }} postgrest-test-spec
93+
run: postgrest-with-${{ matrix.pgVersion }} postgrest-test-spec
9494

9595
- name: Run observability tests
9696
if: always()
97-
run: postgrest-with-pg-${{ matrix.pgVersion }} postgrest-test-observability
97+
run: postgrest-with-${{ matrix.pgVersion }} postgrest-test-observability
9898

9999
- name: Run IO tests
100100
if: always()
101-
run: postgrest-with-pg-${{ matrix.pgVersion }} postgrest-test-io -vv
101+
run: postgrest-with-${{ matrix.pgVersion }} postgrest-test-io -vv
102102

103103
- name: Run IO tests on a big schema
104104
if: always()
105-
run: postgrest-with-pg-${{ matrix.pgVersion }} postgrest-test-big-schema -vv
105+
run: postgrest-with-${{ matrix.pgVersion }} postgrest-test-big-schema -vv
106106

107107

108108
memory:

default.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ let
5757
{ name = "pg-16"; postgresql = pkgs.postgresql_16.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
5858
{ name = "pg-15"; postgresql = pkgs.postgresql_15.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
5959
{ name = "pg-14"; postgresql = pkgs.postgresql_14.withPackages (p: [ p.postgis p.pg_safeupdate ]); }
60+
{
61+
name = "oriole-17";
62+
postgresql = pkgs.orioledb.withPackages (p: [ p.postgis p.pg_safeupdate ]);
63+
config = "
64+
default_table_access_method = 'orioledb'
65+
shared_preload_libraries = 'orioledb'
66+
";
67+
}
6068
];
6169

6270
haskellPackages = pkgs.haskell.packages."${compiler}";

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description = "REST API for any Postgres database";
33

44
inputs = {
5-
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
5+
nixpkgs.url = "github:wolfgangwalther/nixpkgs/orioledb-latest";
66
};
77

88
nixConfig = {

nix/tools/withTools.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
}:
1212
let
1313
withTmpDb =
14-
{ name, postgresql }:
14+
{ name, postgresql, config ? "" }:
1515
let
1616
commandName = "postgrest-with-${name}";
17-
postgresqlConf = writeText "postgresql.conf" "
17+
postgresqlConf = writeText "postgresql.conf" ("
1818
autovacuum = false
1919
listen_addresses = ''
2020
log_statement = all
21-
";
21+
" + config);
2222
in
2323
checkedShellScript
2424
{

test/io/fixtures/big_schema.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
\ir ../../orioledb.sql
2+
13
/*
24
This is a 2018 version of the apflora schema https://github.com/barbalex/apf2/tree/master/sql/apflora - latest version likely has differing contents
35

test/io/fixtures/load.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
\set ON_ERROR_STOP on
44

5+
\ir ../../orioledb.sql
56
\ir database.sql
67
\ir db_config.sql
78
\ir roles.sql

test/load/fixtures.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
\ir ../orioledb.sql
2+
13
CREATE ROLE postgrest_test_anonymous;
24
CREATE ROLE postgrest_test_author;
35
GRANT postgrest_test_anonymous TO :"PGUSER";

test/observability/fixtures/load.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
\set ON_ERROR_STOP on
44

5+
\ir ../../orioledb.sql
56
\ir database.sql
67
\ir roles.sql
78
\ir schema.sql

test/orioledb.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SELECT EXISTS (SELECT * FROM pg_available_extensions WHERE name = 'orioledb') AS is_orioledb_available \gset
2+
3+
\if :is_orioledb_available
4+
CREATE SCHEMA orioledb;
5+
CREATE EXTENSION orioledb WITH SCHEMA orioledb;
6+
\endif

0 commit comments

Comments
 (0)