Skip to content

Commit

Permalink
STREAM-683/workflow-bugs (#64)
Browse files Browse the repository at this point in the history
* set environment variables conditionally based on dispatch event
abstract target to environment variable
use input variable for python version

* workflow fixes

* Squashed commit of the following:

commit 3c297e7
Author: Julius Remigio <[email protected]>
Date:   Wed Oct 25 15:08:41 2023 -0700

    set environment variables conditionally based on dispatch event (#63)

    abstract target to environment variable
    use input variable for python version
  • Loading branch information
juls858 authored Oct 25, 2023
1 parent 3c297e7 commit 737dd3f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/dbt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,33 @@ jobs:
run: |
${{ inputs.command }}
- name: Store logs
if: always()
uses: actions/upload-artifact@v3
with:
name: dbt-logs
path: |
logs
target
not_dispatched:
if: github.event_name != 'workflow_dispatch'
runs-on: ubuntu-latest
environment:
name: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
cache: "pip"
- name: install dependencies
run: |
pip install -r requirements.txt
dbt deps
- name: Run DBT Jobs
run: |
${{ inputs.command }}
- name: Store logs
if: always()
uses: actions/upload-artifact@v3
with:
name: dbt-logs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dbt_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
warehouse: ${{ vars.WAREHOUSE }}
environment: hosted
command: test -s test___utils_udf_introspect
command: dbt test -s test___utils_udf_introspect

prod:
uses: ./.github/workflows/dbt.yml
Expand All @@ -46,7 +46,7 @@ jobs:
with:
warehouse: ${{ vars.WAREHOUSE }}
environment: prod
command: test -s test___utils_udf_introspect
command: dbt test -s test___utils_udf_introspect

dispatched:
uses: ./.github/workflows/dbt.yml
Expand All @@ -55,4 +55,4 @@ jobs:
with:
warehouse: ${{ inputs.warehouse }}
environment: ${{ inputs.environment }}
command: test -s test___utils_udf_introspect
command: dbt test -s test___utils_udf_introspect
2 changes: 1 addition & 1 deletion .github/workflows/dbt_run_dev_refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
secrets: inherit
with:
environment: prod
command: run-operation run_sp_create_prod_clone
command: dbt run-operation run_sp_create_prod_clone
4 changes: 2 additions & 2 deletions .github/workflows/dbt_udf_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
warehouse: ${{ vars.WAREHOUSE }}
environment: prod
command: test --selector test_udfs --threads 24
command: dbt test --selector test_udfs --threads 24

dispatched:
uses: ./.github/workflows/dbt.yml
Expand All @@ -46,4 +46,4 @@ jobs:
with:
warehouse: ${{ inputs.warehouse }}
environment: ${{ inputs.environment }}
command: test --selector test_udfs --threads 24
command: dbt test --selector test_udfs --threads 24

0 comments on commit 737dd3f

Please sign in to comment.