Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
60 changes: 60 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright 2025 Columnar Technologies Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Integration

on:
push:
branches:
- "main"
pull_request:

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
integration:
name: Build & Integrate (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: 1.24.2
cache: true
cache-dependency-path: go.sum

- name: Install Python
uses: actions/setup-python@v6
with:
python-version: "3.13"

- name: Build dbc
run: |
go build -o dbc ./cmd/dbc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we using the -o so that it doesn't call it dbc.exe on windows? otherwise you can just remove the -o argument entirely since by default it'll use dbc as the name since that's the package name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice. I just always run it with -o. Removed in 30d3b4c and will watch CI.

shell: bash

- name: Run Integration Tests
run: ./ci/scripts/run_integration.sh
shell: bash
17 changes: 17 additions & 0 deletions ci/scripts/run_integration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -eux

python -m venv .venv

if [ -f ".venv/bin/activate" ]; then
. ".venv/bin/activate"
else
. ".venv/Scripts/activate"
fi

pip install adbc_driver_manager

./dbc install duckdb

python -c "from adbc_driver_manager import dbapi; dbapi.connect(driver=\"duckdb\");"
14 changes: 13 additions & 1 deletion config/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,24 @@ func createDriverManifest(location string, driver DriverInfo) error {
}
}

f, err := os.Create(filepath.Join(location, driver.ID+".toml"))
manifest_path := filepath.Join(location, driver.ID+".toml")
f, err := os.Create(manifest_path)
if err != nil {
return fmt.Errorf("error creating manifest %s: %w", driver.ID, err)
}
defer f.Close()

// Workaround for bug in Python driver manager packages. Version 1.8.0 of the
// packages use the old ADBC_CONFIG_PATH path we originally had and not the
// new ADBC_DRIVER_PATH (e.g., /etc/adbc instead of /etc/adbc/drivers).
//
// To work around this, we create a symlink on level up to the manifest we're
// installing.
//
// TODO: Remove this when the driver managers are fixed (>=1.8.1).
symlink := filepath.Join(location, "..", driver.ID+".toml")
os.Symlink(manifest_path, symlink)

toEncode := tomlDriverInfo{
ManifestVersion: currentManifestVersion,
Name: driver.Name,
Expand Down
Loading