From 8601e73f41b8691d0101b1fba00cf11f67da5d12 Mon Sep 17 00:00:00 2001
From: David Li
Date: Thu, 5 Mar 2026 15:47:45 +0900
Subject: [PATCH] chore: remove old reusable workflows
Closes #104.
---
.github/workflows/dev.yaml | 10 -
.github/workflows/dev_issues.yaml | 1 -
.github/workflows/release.yaml | 97 ---------
.github/workflows/test.yaml | 313 ------------------------------
.github/workflows/test_local.yaml | 10 -
.github/workflows/validate.yaml | 188 ------------------
6 files changed, 619 deletions(-)
delete mode 100644 .github/workflows/release.yaml
delete mode 100644 .github/workflows/test.yaml
delete mode 100644 .github/workflows/validate.yaml
diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml
index 4e8ed0b..136d9cf 100644
--- a/.github/workflows/dev.yaml
+++ b/.github/workflows/dev.yaml
@@ -31,7 +31,6 @@ on:
push:
branches:
- main
- workflow_call: {}
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
@@ -58,20 +57,11 @@ jobs:
persist-credentials: false
- name: Check PR title format
- if: github.repository == 'adbc-drivers/dev'
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
python adbc_drivers_dev/title_check.py $(pwd) "$PR_TITLE"
- - name: Check PR title format
- if: github.repository != 'adbc-drivers/dev'
- env:
- PR_TITLE: ${{ github.event.pull_request.title }}
- run: |
- git clone --depth 1 https://github.com/adbc-drivers/dev
- python dev/adbc_drivers_dev/title_check.py $(pwd) "$PR_TITLE"
-
lint:
name: "lint & pre-commit"
runs-on: ubuntu-latest
diff --git a/.github/workflows/dev_issues.yaml b/.github/workflows/dev_issues.yaml
index 9627e3c..5c6ab19 100644
--- a/.github/workflows/dev_issues.yaml
+++ b/.github/workflows/dev_issues.yaml
@@ -27,7 +27,6 @@ on:
types:
- created
- edited
- workflow_call: {}
jobs:
issue_assign:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
deleted file mode 100644
index 9ab9b69..0000000
--- a/.github/workflows/release.yaml
+++ /dev/null
@@ -1,97 +0,0 @@
-# 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.
-
-# This is a common workflow for releasing Go drivers. It should be run
-# against a Go-style tag for a subdirectory (e.g. go/redshift/v1.0.0) and
-# should be sequenced after test.yaml.
-
-name: Release
-
-on:
- workflow_call:
- inputs:
- dry_run:
- required: false
- default: false
- type: boolean
- subdir:
- required: false
- type: string
- tag:
- required: false
- default: ""
- type: string
-
-concurrency:
- group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
- cancel-in-progress: true
-
-defaults:
- run:
- shell: bash
-
-# Unfortunately, creating releases needs contents: write which is rather
-# broad. https://github.com/orgs/community/discussions/68252
-permissions:
- contents: write
-
-jobs:
- build:
- name: "Release"
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v6
- with:
- fetch-depth: 0
- persist-credentials: false
-
- - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
- with:
- pixi-version: v0.50.2
- run-install: false
-
- - uses: actions/download-artifact@v8
- with:
- name: "all-packages"
- path: "~/packages"
-
- - uses: actions/download-artifact@v8
- with:
- name: "docs"
- path: "~/packages"
-
- - name: Release
- if: "!inputs.dry_run"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- working-directory: ${{ inputs.subdir }}
- run: |
- ref=${{ github.ref }}
- tag=${ref#"refs/tags/"}
-
- pixi run release $(pwd) $tag
- gh release upload $tag $(find ~/packages -name '*.tar.gz') $(find ~/packages -name 'manifest.yaml') $(find ~/packages -name '*.md')
-
- - name: Release (dry-run)
- if: inputs.dry_run
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- working-directory: ${{ inputs.subdir }}
- run: |
- git tag ${{ inputs.tag }}
- tag=${{ inputs.tag }}
-
- 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')
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
deleted file mode 100644
index 655c528..0000000
--- a/.github/workflows/test.yaml
+++ /dev/null
@@ -1,313 +0,0 @@
-# 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.
-
-# This is a common workflow for building & testing Go drivers:
-#
-# - Build the driver
-# - Start dependencies
-# - Run tests
-# - Build the shared library
-
-name: Build & Test
-
-on:
- workflow_call:
- inputs:
- driver:
- required: true
- type: string
- subdir:
- required: false
- type: string
- release:
- default: false
- required: false
- type: boolean
-
- # XXX(https://github.com/actions/runner/issues/1490): the caller of a
- # reusable workflow can't use an environment. Instead, it has to pass us
- # the environment to use. It then has to explicitly pass us the secrets
- # a second time.
- environment:
- required: false
- type: string
- default: null
-
- # Set this to enable logging in to AWS.
- aws_region:
- required: false
- type: string
- default: ""
-
- gcloud:
- required: false
- default: false
- type: boolean
- secrets:
- # Extra env vars that will be sourced (presumably, these come from an
- # environment and are used to implement workflows requiring approval)
- environment:
- required: false
-
- # For workflows using AWS resources, the AWS role to assume
- aws_role:
- required: false
- aws_role_session_name:
- required: false
-
- # For workflows using Google Cloud resources
- gcloud_service_account:
- required: false
- gcloud_workload_identity_provider:
- required: false
-
-concurrency:
- group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}-test
- cancel-in-progress: true
-
-defaults:
- run:
- shell: bash
-
-permissions:
- contents: read
-
-jobs:
- test:
- name: "Test ${{ inputs.driver }}/${{ matrix.os }} ${{ matrix.arch }}"
- runs-on: ${{ matrix.runner }}
- strategy:
- fail-fast: true
- matrix:
- include:
- - { os: Linux, platform: linux, arch: amd64, runner: ubuntu-latest }
- - { os: macOS, platform: macos, arch: arm64, runner: macos-latest }
- - { os: Windows, platform: win, arch: amd64, runner: windows-latest }
- environment: ${{ inputs.environment }}
- # XXX: required for AWS auth. Unfortunately, we can't use templating to
- # dynamically set id-token based on the inputs, so we have to request
- # broader permissions than strictly needed.
- permissions:
- contents: read
- id-token: write
-
- steps:
- - uses: actions/checkout@v6
- with:
- fetch-depth: 0
- persist-credentials: false
-
- - uses: actions/setup-go@v6
- with:
- cache-dependency-path: ${{ inputs.subdir || inputs.driver }}/go.sum
- check-latest: true
- go-version-file: ${{ inputs.subdir || inputs.driver }}/go.mod
-
- - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
- with:
- pixi-version: v0.62.2
- run-install: false
-
- - name: AWS Login
- if: inputs.aws_region != ''
- uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
- with:
- role-to-assume: ${{ secrets.aws_role }}
- role-session-name: ${{ secrets.aws_role_session_name }}
- aws-region: ${{ inputs.aws_region }}
-
- - name: Google Cloud Login
- if: inputs.gcloud
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
- with:
- service_account: ${{ secrets.gcloud_service_account }}
- workload_identity_provider: ${{ secrets.gcloud_workload_identity_provider }}
-
- - name: Build
- working-directory: ${{ inputs.subdir || inputs.driver }}
- run: |
- 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: ${{ inputs.subdir || inputs.driver }}
- 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
- if: runner.os == 'Linux'
- working-directory: ${{ inputs.subdir || inputs.driver }}
- run: |
- set -a
- if [[ -f .env ]]; then
- source .env
- fi
- if [[ -f .env.ci ]]; then
- source .env.ci
- fi
- set +a
-
- if [[ -n "${{ secrets.environment }}" ]]; then
- echo "Loading secret environment variables"
- eval "${{ secrets.environment }}"
- fi
-
- if [[ -f ci/scripts/pre-test.sh ]]; then
- echo "Loading pre-test"
- ./ci/scripts/pre-test.sh
- 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: ${{ inputs.subdir || inputs.driver }}
- run: |
- go mod tidy --diff
-
- - name: Test
- if: runner.os != 'Linux'
- working-directory: ${{ inputs.subdir || inputs.driver }}
- run: |
- go test -tags assert -v ./...
-
- build:
- name: "Build ${{ inputs.driver }}/${{ matrix.os }} ${{ matrix.arch }}"
- needs: test
- runs-on: ${{ matrix.runner }}
- strategy:
- fail-fast: true
- matrix:
- include:
- - { os: Linux, platform: linux, arch: amd64, runner: ubuntu-latest }
- - { os: Linux, platform: linux, arch: arm64, runner: ubuntu-24.04-arm }
- - { os: macOS, platform: macos, arch: arm64, runner: macos-latest }
- - { os: Windows, platform: windows, arch: amd64, runner: windows-latest }
- permissions:
- contents: read
- packages: read
-
- steps:
- - uses: actions/checkout@v6
- with:
- fetch-depth: 0
- persist-credentials: false
-
- - uses: actions/setup-go@v6
- with:
- cache-dependency-path: ${{ inputs.subdir || inputs.driver }}/go.sum
- check-latest: true
- go-version-file: ${{ inputs.subdir || inputs.driver }}/go.mod
-
- - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
- with:
- pixi-version: v0.62.2
- run-install: false
-
- - name: Install dev tools
- working-directory: ${{ inputs.subdir || inputs.driver }}
- 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: ${{ inputs.subdir || inputs.driver }}
- run: |
- pixi run adbc-make check CI=true VERBOSE=true DRIVER=${{ inputs.driver }}
-
- - uses: actions/upload-artifact@v7
- with:
- name: drivers-${{ matrix.platform }}-${{ matrix.arch }}
- path: "${{ inputs.subdir || '.' }}/build/libadbc_driver_${{ inputs.driver }}.*"
- retention-days: 2
-
- package:
- name: "Generate Packages"
- runs-on: ubuntu-latest
- needs: build
-
- steps:
- - uses: actions/checkout@v6
- with:
- fetch-depth: 0
- persist-credentials: false
-
- - uses: actions/setup-go@v6
- with:
- check-latest: true
- go-version: "stable"
-
- - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
- with:
- pixi-version: v0.62.2
- run-install: false
-
- - uses: actions/download-artifact@v8
- with:
- pattern: "drivers-*"
- path: "~/drivers"
-
- - name: Install tools
- working-directory: ${{ inputs.subdir || inputs.driver }}
- 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: ${{ inputs.subdir || inputs.driver }}
- run: |
- pixi install
-
- pixi run adbc-gen-package \
- --name ${{ inputs.driver }} \
- --root $(pwd) \
- --manifest-template manifest.toml \
- ${{ (inputs.release && '--release') || '' }}\
- -o ~/packages \
- ~/drivers/drivers-*-*/
-
- ls ~/packages
-
- - uses: actions/upload-artifact@v7
- with:
- name: all-packages
- path: ~/packages
- retention-days: 7
diff --git a/.github/workflows/test_local.yaml b/.github/workflows/test_local.yaml
index b4b9e20..e3c1901 100644
--- a/.github/workflows/test_local.yaml
+++ b/.github/workflows/test_local.yaml
@@ -12,16 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# This is a common workflow for building & testing Go drivers:
-#
-# - Build the driver
-# - Start dependencies
-# - Run tests
-# - Build the shared library
-#
-# It is also planned to add credentials and run the full test suite where
-# possible.
-
name: Test
on:
diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml
deleted file mode 100644
index 6d26644..0000000
--- a/.github/workflows/validate.yaml
+++ /dev/null
@@ -1,188 +0,0 @@
-# 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.
-
-# This is a common workflow for running the validation suite.
-
-name: Run Validation Suite
-
-on:
- workflow_call:
- inputs:
- driver:
- required: true
- type: string
- subdir:
- required: false
- type: string
-
- # XXX(https://github.com/actions/runner/issues/1490): the caller of a
- # reusable workflow can't use an environment. Instead, it has to pass us
- # the environment to use. It then has to explicitly pass us the secrets
- # a second time.
- environment:
- required: false
- type: string
- default: null
-
- # Set this to enable logging in to AWS.
- aws_region:
- required: false
- type: string
- default: ""
-
- gcloud:
- required: false
- default: false
- type: boolean
- secrets:
- # Extra env vars that will be sourced (presumably, these come from an
- # environment and are used to implement workflows requiring approval)
- environment:
- required: false
-
- # For workflows using AWS resources, the AWS role to assume
- aws_role:
- required: false
- aws_role_session_name:
- required: false
-
- # For workflows using Google Cloud resources
- gcloud_service_account:
- required: false
- gcloud_workload_identity_provider:
- required: false
-
-concurrency:
- group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}-validate
- cancel-in-progress: true
-
-defaults:
- run:
- shell: bash
-
-permissions:
- contents: read
-
-jobs:
- build:
- name: "Run Validation Suite ${{ inputs.driver }}/${{ matrix.os }} ${{ 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
- - { os: Linux, arch: amd64, runner: ubuntu-latest }
- environment: ${{ inputs.environment }}
- # XXX: required for AWS auth. Unfortunately, we can't use templating to
- # dynamically set id-token based on the inputs, so we have to request
- # broader permissions than strictly needed.
- permissions:
- contents: read
- id-token: write
-
- steps:
- - uses: actions/checkout@v6
- with:
- fetch-depth: 0
- persist-credentials: false
-
- - uses: actions/setup-go@v6
- with:
- cache-dependency-path: ${{ inputs.driver }}/go.sum
- check-latest: true
- go-version-file: ${{ inputs.subdir || inputs.driver }}/go.mod
-
- - uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
- with:
- pixi-version: v0.62.2
- run-install: false
-
- - name: Install dev tools
- working-directory: ${{ inputs.subdir || inputs.driver }}
- run: |
- pixi install
-
- - name: AWS Login
- if: inputs.aws_region != ''
- uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
- with:
- role-to-assume: ${{ secrets.aws_role }}
- role-session-name: ${{ secrets.aws_role_session_name }}
- aws-region: ${{ inputs.aws_region }}
-
- - name: Google Cloud Login
- if: inputs.gcloud
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
- with:
- service_account: ${{ secrets.gcloud_service_account }}
- workload_identity_provider: ${{ secrets.gcloud_workload_identity_provider }}
-
- - name: Build Library
- working-directory: ${{ inputs.subdir || inputs.driver }}
- run: |
- pixi run adbc-make build DEBUG=true VERBOSE=true DRIVER=${{ inputs.driver }}
-
- - 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: ${{ inputs.subdir || inputs.driver }}
- 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
- working-directory: ${{ inputs.subdir || inputs.driver }}
- run: |
- set -a
- if [[ -f .env ]]; then
- echo "Loading .env"
- source ".env"
- fi
- if [[ -f .env.ci ]]; then
- echo "Loading .env.ci"
- source ".env.ci"
- fi
- set +a
-
- if [[ -n "${{ secrets.environment }}" ]]; then
- echo "Loading secret environment variables"
- eval "${{ secrets.environment }}"
- fi
-
- if [[ -f ci/scripts/pre-test.sh ]]; then
- echo "Loading pre-test"
- ./ci/scripts/pre-test.sh
- fi
-
- docker ps
- pixi run validate
-
- - name: Generate docs
- working-directory: ${{ inputs.subdir || inputs.driver }}
- run: |
- pixi run gendocs --output generated
-
- - uses: actions/upload-artifact@v7
- with:
- name: docs
- path: "${{ inputs.subdir || inputs.driver }}/generated/${{ inputs.driver }}.md"
- retention-days: 2