Skip to content

CI: run unit + extension integration suite on Linux, macOS, and Windows #5

CI: run unit + extension integration suite on Linux, macOS, and Windows

CI: run unit + extension integration suite on Linux, macOS, and Windows #5

Workflow file for this run

# Copyright 2026 Query Farm LLC - https://query.farm
#
# Unit tests + the sqllogictest extension suite (test/sql/*.test) run against
# the easter worker through the real signed `vgi` DuckDB community extension via
# a prebuilt standalone `haybarn-unittest`. Both jobs run on Linux, macOS, and
# Windows. See ci/README.md for the design.
#
# Reusable (workflow_call) so publish.yml can gate releases on a green run.
name: CI
on:
push:
pull_request:
workflow_dispatch:
workflow_call:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
# Haybarn release providing the prebuilt haybarn-unittest binary. Must be
# ABI-compatible with the community-published vgi extension. See ci/README.md.
HAYBARN_RELEASE: haybarn-v1.5.3-rc10
jobs:
unit:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- name: Run unit tests
run: uv run --python 3.13 pytest tests/ -q
integration:
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, asset: haybarn_unittest-linux-amd64.zip }
- { os: macos-latest, asset: haybarn_unittest-osx-arm64.zip }
- { os: windows-latest, asset: haybarn_unittest-windows-amd64.zip }
runs-on: ${{ matrix.os }}
defaults:
run:
# Git Bash on Windows; the integration runner is a bash script.
shell: bash
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- name: Install the easter worker
run: |
uv venv --python 3.13 .venv
uv pip install --python .venv .
- name: Download haybarn-unittest
run: |
gh release download "$HAYBARN_RELEASE" \
--repo Query-farm-haybarn/haybarn \
--pattern '${{ matrix.asset }}' \
--output haybarn-unittest.zip --clobber
mkdir -p hb && unzip -o -q haybarn-unittest.zip -d hb
env:
GH_TOKEN: ${{ github.token }}
- name: Resolve runner + worker paths
run: |
# The worker LOCATION is consumed by the (native) extension process,
# so on Windows it must be a native path to the .exe launcher; the
# unittest binary itself is exec'd by bash, so a POSIX path is fine.
if [ "$RUNNER_OS" = "Windows" ]; then
UNITTEST=$(find hb -name 'haybarn-unittest.exe' -type f | head -1)
WORKER=$(cygpath -w "$PWD/.venv/Scripts/vgi-easter.exe")
else
UNITTEST=$(find hb -name 'haybarn-unittest' -type f | head -1)
chmod +x "$UNITTEST"
WORKER="$PWD/.venv/bin/vgi-easter"
fi
echo "HAYBARN_UNITTEST=$UNITTEST" >> "$GITHUB_ENV"
echo "VGI_EASTER_WORKER=$WORKER" >> "$GITHUB_ENV"
- name: Run extension integration suite
run: ci/run-integration.sh