Continuous Integration
dbc works well in non-interactive environments such as on continuous integration (CI) platforms. You may also want to read through our Version Control guide as these two concepts are related.
GitHub Actions
We recommend using the columnar-tech/setup-dbc action if you're using GitHub Actions for CI.
As an example, here's a workflow that automatically installs all drivers listed in your driver list before running your tests:
name: Test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Note: Automatically installs drivers specified in dbc.toml
- uses: columnar-tech/setup-dbc@v1
- name: Run tests
run: pytest ...
See the columnar-tech/setup-dbc README for usage information and more examples.
Other CI Systems
To use dbc with other CI systems, we recommend using our command line installers because they will always install the latest version of dbc for whatever platform you run them on.
As an example for you to adapt to your system, here's a GitHub Actions workflow that installs and makes dbc available without using columnar-tech/setup-dbc:
name: Test
on: [push]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v6
- name: Install dbc (Linux, macOS)
if: runner.os != 'Windows'
run: |
curl -LsSf https://dbc.columnar.tech/install.sh | sh
- name: Install dbc (Windows)
if: runner.os == 'Windows'
run: |
powershell -ExecutionPolicy ByPass -c "irm https://dbc.columnar.tech/install.ps1 | iex"
- name: Add dbc to PATH (Linux, macOS)
if: runner.os != 'Windows'
shell: bash
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Add dbc to PATH (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Join-Path $env:USERPROFILE ".local\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Run tests
run: pytest ...