Skip to content

chore: (deps): bump the actions group across 1 directory with 10 updates #92

chore: (deps): bump the actions group across 1 directory with 10 updates

chore: (deps): bump the actions group across 1 directory with 10 updates #92

Workflow file for this run

# Copyright (c) 2025 ADBC Drivers Contributors
#
# 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.
# !!!! AUTO-GENERATED FILE. DO NOT EDIT. !!!!
# USE adbc-gen-workflow (see adbc-drivers/dev) TO UPDATE THIS FILE.
# This is a common workflow for building & testing drivers:
#
# - Build the driver
# - Start dependencies
# - Run tests
# - Build the shared library
name: Go Test
on:
pull_request:
branches:
- main
paths:
- "go/**"
- .github/workflows/go_test.yaml
push:
branches:
- main
paths:
- "go/**"
- .github/workflows/go_test.yaml
workflow_call:
inputs:
repository:
description: "The repository to checkout (in owner/repo short format)"
required: true
type: string
ref:
description: "The ref to checkout"
required: true
type: string
secrets:
DATABRICKS_HOST:
required: true
DATABRICKS_TOKEN:
required: true
TEST_PECO_WAREHOUSE_HTTP_PATH:
required: true
DATABRICKS_TEST_CLIENT_ID:
required: true
DATABRICKS_TEST_CLIENT_SECRET:
required: true
concurrency:
# Must share concurrency group with release workflow since it also builds/tests
group: ${{ github.repository }}-${{ github.ref }}-azure-prod
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
test:
name: "Test/${{ matrix.platform }}_${{ matrix.arch }}"
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: windows, arch: amd64, runner: windows-latest }
environment: azure-prod
permissions:
contents: read
steps:
- name: free up disk space
if: runner.os != 'Windows'
run: |
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false
- name: "checkout remote"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
check-latest: true
go-version-file: go/go.mod
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.63.2
run-install: false
- name: Build
working-directory: go
run: |
if [[ -f ci/scripts/pre-build.sh ]]; then
echo "Loading pre-build"
./ci/scripts/pre-build.sh test ${{ matrix.platform }} ${{ matrix.arch }}
fi
go build ./...
- name: Start Test Dependencies
# Can't use Docker on macOS AArch64 runners, and Windows containers
# work but often the container doesn't support Windows
if: runner.os == 'Linux'
working-directory: go
run: |
if [[ -f compose.yaml ]]; then
if ! docker compose up --detach --wait test-service; then
echo "Service failed to start"
echo "Logs:"
docker compose logs test-service
exit 1
fi
fi
- name: Test
env:
DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}
DATABRICKS_ACCESSTOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_HTTPPATH: ${{ secrets.TEST_PECO_WAREHOUSE_HTTP_PATH }}
DATABRICKS_OAUTH_CLIENT_ID: ${{ secrets.DATABRICKS_TEST_CLIENT_ID }}
DATABRICKS_OAUTH_CLIENT_SECRET: ${{ secrets.DATABRICKS_TEST_CLIENT_SECRET }}
working-directory: go
run: |
set -a
if [[ -f .env ]]; then
source .env
fi
if [[ -f .env.${{ matrix.platform }} ]]; then
source .env.${{ matrix.platform }}
fi
if [[ -f .env.ci ]]; then
source .env.ci
fi
set +a
if [[ -f ci/scripts/pre-test.sh ]]; then
echo "Loading pre-test"
./ci/scripts/pre-test.sh ${{ matrix.platform }} ${{ matrix.arch }}
fi
go test -tags assert -v ./...
if [[ -f ci/scripts/post-test.sh ]]; then
./ci/scripts/post-test.sh
fi
- name: go mod tidy
if: runner.os == 'Linux'
working-directory: go
run: |
go mod tidy --diff
validate:
name: "Validate/${{ matrix.platform }}_${{ matrix.arch }}"
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
# I think we only need to test one platform, but we can change that later
- { platform: linux, arch: amd64, runner: ubuntu-latest }
environment: azure-prod
permissions:
contents: read
steps:
- name: free up disk space
if: runner.os != 'Windows'
run: |
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false
- name: "checkout remote"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
check-latest: true
go-version-file: go/go.mod
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.63.2
run-install: false
- name: Log in to ghcr.io
if: runner.os == 'Linux'
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build Library
working-directory: go
run: |
if [[ -f ci/scripts/pre-build.sh ]]; then
./ci/scripts/pre-build.sh test ${{ matrix.platform }} ${{ matrix.arch }}
fi
set -a
if [[ -f .env.release ]]; then
source .env.test
fi
set +a
pixi run adbc-make build DEBUG=true VERBOSE=true DRIVER=databricks IMPL_LANG=go
- name: Start Test Dependencies
# Can't use Docker on macOS AArch64 runners, and Windows containers
# work but often the container doesn't support Windows
if: runner.os == 'Linux'
working-directory: go
run: |
if [[ -f compose.yaml ]]; then
if ! docker compose up --detach --wait test-service; then
echo "Service failed to start"
echo "Logs:"
docker compose logs test-service
exit 1
fi
fi
- name: Validate
if: runner.os == 'Linux'
env:
DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}
DATABRICKS_ACCESSTOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_HTTPPATH: ${{ secrets.TEST_PECO_WAREHOUSE_HTTP_PATH }}
DATABRICKS_OAUTH_CLIENT_ID: ${{ secrets.DATABRICKS_TEST_CLIENT_ID }}
DATABRICKS_OAUTH_CLIENT_SECRET: ${{ secrets.DATABRICKS_TEST_CLIENT_SECRET }}
working-directory: go
run: |
set -a
if [[ -f .env ]]; then
source .env
fi
if [[ -f .env.${{ matrix.platform }} ]]; then
source .env.${{ matrix.platform }}
fi
if [[ -f .env.ci ]]; then
source .env.ci
fi
set +a
if [[ -f ci/scripts/pre-test.sh ]]; then
echo "Loading pre-test"
./ci/scripts/pre-test.sh ${{ matrix.platform }} ${{ matrix.arch }}
fi
docker ps
pixi run validate
if [[ -f ci/scripts/post-test.sh ]]; then
./ci/scripts/post-test.sh
fi
- uses: actions/upload-artifact@47309c993abb98030a35d55ef7ff34b7fa1074b5 # v6.0.0
with:
name: validation-report
path: "go/validation-report.xml"
retention-days: 7
- name: Generate docs
working-directory: go
run: |
pixi run gendocs --output generated
- uses: actions/upload-artifact@47309c993abb98030a35d55ef7ff34b7fa1074b5 # v6.0.0
with:
name: docs
path: "go/generated/databricks.md"
retention-days: 2
build:
name: "Build databricks/${{ matrix.platform }}_${{ matrix.arch }}"
needs: test
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: linux, arch: arm64, runner: ubuntu-24.04-arm }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: windows, arch: amd64, runner: windows-latest }
environment: azure-prod
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false
- name: "checkout remote"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
check-latest: true
go-version-file: go/go.mod
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.63.2
run-install: false
- name: Install dev tools
working-directory: go
run: |
pixi install
- name: Log in to ghcr.io
if: runner.os == 'Linux'
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build Library
working-directory: go
run: |
if [[ -f ci/scripts/pre-build.sh ]]; then
./ci/scripts/pre-build.sh release ${{ matrix.platform }} ${{ matrix.arch }}
fi
set -a
if [[ -f .env.release ]]; then
source .env.release
fi
set +a
pixi run adbc-make check CI=true VERBOSE=true DRIVER=databricks IMPL_LANG=go
- uses: actions/upload-artifact@47309c993abb98030a35d55ef7ff34b7fa1074b5 # v6.0.0
with:
name: drivers-${{ matrix.platform }}-${{ matrix.arch }}
path: "go/build/libadbc_driver_databricks.*"
retention-days: 2
package:
name: "Generate Packages"
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false
- name: "checkout remote"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
check-latest: true
go-version: "stable"
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.63.2
run-install: false
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
pattern: "drivers-*"
path: "~/drivers"
- name: Install tools
working-directory: go
run: |
# XXX: can't install go-licenses under go 1.25
# https://github.com/google/go-licenses/issues/312
git clone --depth=1 https://github.com/google/go-licenses
git config --global --add 'url.https://github.com/.insteadOf' ssh://git@github.com/
pushd go-licenses
go get -u
# Silent break: https://github.com/spf13/cobra/pull/2303
# Manually edit the go.mod to get around this for now
sed -i 's|github.com/spf13/pflag v1.0.8|github.com/spf13/pflag v1.0.7|g' go.mod
go mod tidy
go install .
popd
- name: Generate packages
working-directory: go
run: |
pixi install
pixi run adbc-gen-package \
--name databricks \
--root $(pwd) \
--manifest-template $(pwd)/manifest.toml \
${{ (inputs.release && '--release') || '' }}\
-o ~/packages \
~/drivers/drivers-*-*/
ls ~/packages
- uses: actions/upload-artifact@47309c993abb98030a35d55ef7ff34b7fa1074b5 # v6.0.0
with:
name: all-packages
path: ~/packages
retention-days: 7
test-packages:
name: "Test Packages/${{ matrix.platform }}_${{ matrix.arch }}"
runs-on: ${{ matrix.runner }}
needs:
- package
strategy:
fail-fast: false
matrix:
include:
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: windows, arch: amd64, runner: windows-latest }
environment: azure-prod
steps:
# for now, install dbc from main
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 'stable'
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.63.2
run-install: false
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: "all-packages"
path: "~/packages"
- name: install package
# dbc uses the filename as the driver name
run: |
echo "Installing dbc"
git clone --depth 1 https://github.com/columnar-tech/dbc
cd dbc
go build ./cmd/dbc
echo "Installed dbc"
ls -laR ~/packages
driver_pkg=$(find ~/packages -name '*_${{ matrix.platform }}_${{ matrix.arch }}_*.tar.gz')
echo "Installing ${driver_pkg}"
./dbc install --no-verify "${driver_pkg}"
echo "Installed ${driver_pkg}"
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 1
persist-credentials: false
- name: "checkout remote"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
fetch-depth: 1
persist-credentials: false
- name: load package
working-directory: go
run: |
if [[ -f ci/scripts/pre-build.sh ]]; then
echo "Loading pre-build"
./ci/scripts/pre-build.sh test ${{ matrix.platform }} ${{ matrix.arch }}
fi
if [[ -f .env.ci ]]; then
source .env.ci
fi
pixi exec -s adbc-driver-manager -s pyarrow -s pytest python -m pytest -vs ci/test_package.py
release:
name: "Release (Dry Run)"
runs-on: ubuntu-latest
needs:
- package
- test-packages
- validate
permissions:
contents: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false
- name: "checkout remote"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
check-latest: true
go-version: "stable"
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.63.2
run-install: false
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: "all-packages"
path: "~/packages"
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: "docs"
path: "~/packages"
- name: Release (dry-run)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: go
run: |
git tag go/v1000.0.0
tag=go/v1000.0.0
pixi run release --dry-run $(pwd) $tag
echo gh release upload $tag $(find ~/packages -name '*.tar.gz') $(find ~/packages -name 'manifest.yaml') $(find ~/packages -name '*.md')