Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,62 @@ jobs:
EXTENDDB_ADMIN_PASSWORD: ${{ steps.init.outputs.admin_password }}
run: devtools/run-tests --extenddb --pytest --comprehensive --parallel --filter "not import_export"

run-integration-duckdb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Build release (DuckDB backend)
run: cargo build --release -p extenddb --no-default-features --features duckdb

- name: Initialize ExtendDB
id: init
run: |
output=$(./target/release/extenddb init --backend duckdb --config extenddb.toml 2>&1)
echo "$output"
password=$(echo "$output" | grep -oP 'Password: \K\S+')
echo "admin_password=$password" >> "$GITHUB_OUTPUT"

- name: Start ExtendDB
run: |
# --write-pid-file so devtools/run-tests can restart the server with
# 'extenddb stop' when it needs to apply a config change.
./target/release/extenddb serve --config extenddb.toml --foreground --write-pid-file &
for i in $(seq 1 30); do
if curl -sk https://127.0.0.1:18443/health | grep -q healthy; then
echo "Server ready"
exit 0
fi
sleep 1
done
echo "Server failed to start"
exit 1

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Python dependencies
run: pip install -r requirements.txt

- name: Run integration tests
env:
EXTENDDB_TEST_ENDPOINT: https://127.0.0.1:18443
EXTENDDB_ADMIN_USER: admin
EXTENDDB_ADMIN_PASSWORD: ${{ steps.init.outputs.admin_password }}
# test_gsi_async drives the server out-of-band with `extenddb settings
# set` from a second process. DuckDB holds a process-exclusive lock on
# the database file, so a second process cannot open it while the
# server is running; the propagation paths it exercises are covered by
# the crate's unit tests instead.
run: devtools/run-tests --extenddb --pytest --comprehensive --parallel --filter "not import_export and not test_gsi_async"

run-integration-dev-mode:
# dev-mode was shipped with no CI coverage at all, which is how the batch and
# transaction authorization regression reached main: the build compiled, so
Expand Down Expand Up @@ -321,6 +377,7 @@ jobs:
[
run-integration,
run-integration-sqlite,
run-integration-duckdb,
run-integration-dev-mode,
run-rust-integration,
run-rust-integration-sqlite,
Expand All @@ -330,6 +387,7 @@ jobs:
- run: |
if [ "${{ needs.run-integration.result }}" != "success" ] || \
[ "${{ needs.run-integration-sqlite.result }}" != "success" ] || \
[ "${{ needs.run-integration-duckdb.result }}" != "success" ] || \
[ "${{ needs.run-integration-dev-mode.result }}" != "success" ] || \
[ "${{ needs.run-rust-integration.result }}" != "success" ] || \
[ "${{ needs.run-rust-integration-sqlite.result }}" != "success" ]; then
Expand Down
Loading