Skip to content

Commit

Permalink
update workflows to support dbt-spark in the monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Jan 13, 2025
1 parent a05e4ff commit 10e5ceb
Show file tree
Hide file tree
Showing 20 changed files with 55 additions and 1,514 deletions.
1 change: 1 addition & 0 deletions .github/workflows/_generate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ on:
- "dbt-adapters"
- "dbt-athena"
- "dbt-athena-community"
- "dbt-spark"
merge:
description: "Choose whether to merge the changelog branch"
type: boolean
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/_integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ permissions:
id-token: write
contents: read

env:
DBT_INVOCATION_ENV: ${{ vars.DBT_INVOCATION_ENV }}
DD_CIVISIBILITY_AGENTLESS_ENABLED: ${{ vars.DD_CIVISIBILITY_AGENTLESS_ENABLED }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_SITE: ${{ vars.DD_SITE }}
DD_ENV: ${{ vars.DD_ENV }}
DD_SERVICE: ${{ github.event.repository.name }} # this can change per run because of forks
DBT_TEST_USER_1: ${{ vars.DBT_TEST_USER_1 }}
DBT_TEST_USER_2: ${{ vars.DBT_TEST_USER_2 }}
DBT_TEST_USER_3: ${{ vars.DBT_TEST_USER_3 }}

jobs:
integration-tests-athena:
if: ${{ inputs.package == 'dbt-athena' || inputs.package == 'dbt-athena-community' }}
Expand Down Expand Up @@ -83,3 +94,38 @@ jobs:
aws-region: ${{ vars.DBT_TEST_ATHENA_REGION_NAME }}
- run: hatch run integration-tests
working-directory: ./${{ inputs.package }}

integration-tests-spark:
if: ${{ inputs.package == 'dbt-spark' }}
runs-on: ${{ inputs.os }}
environment:
name: "dbt-spark"
env:
DBT_DATABRICKS_CLUSTER_NAME: ${{ secrets.DBT_DATABRICKS_CLUSTER_NAME }}
DBT_DATABRICKS_HOST_NAME: ${{ secrets.DBT_DATABRICKS_HOST_NAME }}
DBT_DATABRICKS_ENDPOINT: ${{ secrets.DBT_DATABRICKS_ENDPOINT }}
DBT_DATABRICKS_TOKEN: ${{ secrets.DBT_DATABRICKS_TOKEN }}
DBT_DATABRICKS_USER: ${{ secrets.DBT_DATABRICKS_USER }}
strategy:
fail-fast: false
matrix:
profile:
- "apache_spark"
- "spark_session"
- "spark_http_odbc"
- "databricks_sql_endpoint"
- "databricks_cluster"
- "databricks_http_cluster"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
repository: ${{ inputs.repository }}
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- uses: pypa/hatch@install
- run: hatch run pip install -r dagger/requirements.txt
working-directory: ./${{ inputs.package }}
- run: hatch run integration-tests --profile ${{ matrix.profile }}
working-directory: ./${{ inputs.package }}
1 change: 1 addition & 0 deletions .github/workflows/_publish-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
options:
- "dbt-adapters"
- "dbt-athena"
- "dbt-spark"
deploy-to:
description: "Choose whether to publish to test or prod"
type: environment
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
- "dbt-adapters"
- "dbt-athena"
- "dbt-athena-community"
- "dbt-spark"
deploy-to:
description: "Choose whether to publish to test or prod"
type: environment
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ on:
- "dbt-adapters"
- "dbt-athena"
- "dbt-athena-community"
- "dbt-spark"
branch:
description: "Choose the branch to test"
type: string
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_verify-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ on:
- "dbt-tests-adapter"
- "dbt-athena"
- "dbt-athena-community"
- "dbt-spark"
branch:
description: "Choose the branch to build"
type: string
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/backport.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/bot-changelog.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/changelog-existence.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/cut-release-branch.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/docs-issues.yml

This file was deleted.

Loading

0 comments on commit 10e5ceb

Please sign in to comment.