Skip to content

feat: LISTEN/NOTIFY wakeup for instant worker response #33

feat: LISTEN/NOTIFY wakeup for instant worker response

feat: LISTEN/NOTIFY wakeup for instant worker response #33

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
tags: ["v*"]
pull_request:
# Cancel in-progress runs for the same branch (except main)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'main') }}
jobs:
format:
name: "Format check"
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check Rust formatting
run: cargo fmt --all -- --check
test:
name: "Regression tests (PG${{ matrix.pg_version }})"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
pg_version: [18]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build pg_duckpipe builder image
uses: docker/build-push-action@v6
with:
context: .
target: builder
build-args: PG_VERSION=${{ matrix.pg_version }}
load: true
tags: pg_duckpipe:builder-${{ matrix.pg_version }}
cache-from: type=gha,scope=ci-builder-pg${{ matrix.pg_version }}
cache-to: type=gha,mode=max,scope=ci-builder-pg${{ matrix.pg_version }}
- name: Run regression tests
id: run-tests
run: |
docker run --rm \
-v ${{ github.workspace }}/test:/build/test \
-v /tmp/regression-output-${{ matrix.pg_version }}:/results \
pg_duckpipe:builder-${{ matrix.pg_version }} bash -c '
set -euo pipefail
# Pre-fetch the ducklake DuckDB extension needed by tests
/build/docker/fetch-ducklake-ext.sh
chown -R postgres:postgres /var/lib/postgresql/.duckdb /build
# pg_regress refuses to run as root — switch to the postgres user
su postgres -s /bin/bash -c "
export LD_LIBRARY_PATH=/usr/lib/postgresql/${{ matrix.pg_version }}/lib
make -C /build/test/regression check-regression \
PG_CONFIG=/usr/lib/postgresql/${{ matrix.pg_version }}/bin/pg_config
" || {
mkdir -p /results
cp /build/test/regression/regression.diffs /results/ 2>/dev/null || true
cp -r /build/test/regression/log/ /results/log/ 2>/dev/null || true
exit 1
}
'
- name: Upload regression artifacts
if: failure() && steps.run-tests.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: regression-output-pg${{ matrix.pg_version }}
path: /tmp/regression-output-${{ matrix.pg_version }}/
- name: Print logs on failure
if: failure() && steps.run-tests.outcome == 'failure'
run: |
echo "=== regression.diffs ==="
cat /tmp/regression-output-${{ matrix.pg_version }}/regression.diffs || echo "(not found)"
echo ""
for f in /tmp/regression-output-${{ matrix.pg_version }}/log/*; do
[ -f "$f" ] || continue
echo "=== $(basename "$f") (last 100 lines) ==="
tail -100 "$f"
echo ""
done
exit 1