-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (74 loc) · 3.14 KB
/
Copy pathci.yml
File metadata and controls
74 lines (74 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
inputs:
pg_client_version:
description: 'pg_client extension version fetched from extension.ladybugdb.com (default: 0.19.0)'
required: false
default: '0.19.0'
env:
# Version of the pg_client extension fetched from
# https://extension.ladybugdb.com/<ver>/linux_amd64/pg_client/...
# Overridable via the workflow_dispatch `pg_client_version` input.
PG_CLIENT_VERSION: ${{ inputs.pg_client_version || '0.19.0' }}
jobs:
test:
# Per-version gate on real PostgreSQL servers via the official PGXN
# toolchain: pg-build-test compiles, installs, and regress-tests the
# extension against the started PG, then test.sh runs the full
# functional suite (pgembed builds against its bundled PostgreSQL, which
# uses its own Unix socket dir and never conflicts with pg-start).
strategy:
matrix:
pg: [16, 17, 18]
name: 🐘 PostgreSQL ${{ matrix.pg }}
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
steps:
- name: Start PostgreSQL ${{ matrix.pg }}
run: pg-start ${{ matrix.pg }}
- name: Check out the repo
uses: actions/checkout@v4
- name: Download liblbug (for Cypher planner)
run: |
mkdir -p lib
LBUG_TARGET_DIR=$PWD/lib LBUG_LIB_KIND=shared bash scripts/download-liblbug.sh
- name: Download pg_client extension (for ATTACH)
run: |
# Placed next to liblbug.so so ladybug_bridge_attach_postgres()
# can LOAD it when ATTACHing this Postgres to the Ladybug catalog.
curl -fSL "https://extension.ladybugdb.com/v${PG_CLIENT_VERSION}/linux_amd64/pg_client/libpg_client.lbug_extension" -o lib/libpg_client.lbug_extension
- name: Build and install on PostgreSQL ${{ matrix.pg }} (PGXN)
run: pg-build-test
- name: Set up uv (for pgembed + psycopg)
uses: astral-sh/setup-uv@v9.0.0
- name: Functional tests via pgembed on PostgreSQL ${{ matrix.pg }}
run: ./scripts/test.sh
pgembed:
# Fast functional signal on a plain runner (no container): the full
# ./scripts/test.sh suite. pgembed pins its own bundled PostgreSQL, so
# this single PG-18 leg stands in for the matrix's functional runs.
name: 🔬 PostgreSQL 18 (pgembed functional)
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up uv (for pgembed + psycopg)
uses: astral-sh/setup-uv@v9.0.0
- name: Download liblbug (for Cypher planner)
run: |
mkdir -p lib
LBUG_TARGET_DIR=$PWD/lib LBUG_LIB_KIND=shared bash scripts/download-liblbug.sh
- name: Download pg_client extension (for ATTACH)
run: |
# Placed next to liblbug.so so ladybug_bridge_attach_postgres()
# can LOAD it when ATTACHing this Postgres to the Ladybug catalog.
curl -fSL "https://extension.ladybugdb.com/v${PG_CLIENT_VERSION}/linux_amd64/pg_client/libpg_client.lbug_extension" -o lib/libpg_client.lbug_extension
- name: Run functional test suite
run: ./scripts/test.sh