Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
check-latest: true
Expand All @@ -59,7 +59,7 @@ jobs:
run: pip install pre-commit

- name: pre-commit (cache)
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-slim

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
persist-credentials: false
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/generate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
# limitations under the License.

driver = "databricks"
environment = "azure-prod"

[lang]
go = true

[secrets]
DATABRICKS_HOST = { secret = "DATABRICKS_HOST", contexts = ["validate"] }
DATABRICKS_ACCESSTOKEN = { secret = "DATABRICKS_TOKEN", contexts = ["validate"] }
DATABRICKS_HTTPPATH = { secret = "TEST_PECO_WAREHOUSE_HTTP_PATH", contexts = ["validate"] }
DATABRICKS_OAUTH_CLIENT_ID = { secret = "DATABRICKS_TEST_CLIENT_ID", contexts = ["validate"] }
DATABRICKS_OAUTH_CLIENT_SECRET = { secret = "DATABRICKS_TEST_CLIENT_SECRET", contexts = ["validate"] }
39 changes: 18 additions & 21 deletions .github/workflows/go_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ on:

workflow_dispatch: {}


concurrency:
# Must share concurrency group with release workflow since it also builds/tests
group: ${{ github.repository }}-${{ github.ref }}-ci
Expand All @@ -58,6 +57,7 @@ jobs:
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: win, arch: amd64, runner: windows-latest }
environment: azure-prod
permissions:
contents: read
steps:
Expand All @@ -68,12 +68,12 @@ jobs:
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
check-latest: true
Expand Down Expand Up @@ -118,11 +118,6 @@ jobs:
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
Expand Down Expand Up @@ -155,6 +150,7 @@ jobs:
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:
Expand All @@ -165,12 +161,12 @@ jobs:
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
check-latest: true
Expand Down Expand Up @@ -212,6 +208,12 @@ jobs:

- 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
Expand All @@ -223,11 +225,6 @@ jobs:
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
Expand Down Expand Up @@ -268,12 +265,12 @@ jobs:
packages: read

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
check-latest: true
Expand Down Expand Up @@ -321,12 +318,12 @@ jobs:
contents: read

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
check-latest: true
go-version: "stable"
Expand Down Expand Up @@ -388,12 +385,12 @@ jobs:
contents: write

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
check-latest: true
go-version: "stable"
Expand Down
111 changes: 89 additions & 22 deletions .github/workflows/go_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,27 @@ on:
- "go/**"
- .github/workflows/go_test.yaml

workflow_dispatch: {}

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
Expand All @@ -62,6 +81,7 @@ jobs:
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: win, arch: amd64, runner: windows-latest }
environment: azure-prod
permissions:
contents: read
steps:
Expand All @@ -72,12 +92,22 @@ jobs:
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- name: "checkout remote"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
Expand Down Expand Up @@ -122,11 +152,6 @@ jobs:
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
Expand Down Expand Up @@ -159,6 +184,7 @@ jobs:
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:
Expand All @@ -169,12 +195,22 @@ jobs:
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- name: "checkout remote"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
Expand Down Expand Up @@ -216,6 +252,12 @@ jobs:

- 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
Expand All @@ -227,11 +269,6 @@ jobs:
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
Expand Down Expand Up @@ -272,12 +309,22 @@ jobs:
packages: read

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- name: "checkout remote"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
Expand Down Expand Up @@ -325,12 +372,22 @@ jobs:
contents: read

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- name: "checkout remote"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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"
Expand Down Expand Up @@ -392,12 +449,22 @@ jobs:
contents: read

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name != 'workflow_dispatch'
with:
fetch-depth: 0
persist-credentials: false

- name: "checkout remote"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
check-latest: true
go-version: "stable"
Expand Down
Loading
Loading