livequery-base/.github/workflows/dbt_udf_test.yml
Julius Remigio 737dd3fa3d
STREAM-683/workflow-bugs (#64)
* 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 3c297e75fb
Author: Julius Remigio <14811322+juls858@users.noreply.github.com>
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
2023-10-25 15:49:35 -07:00

49 lines
1.2 KiB
YAML

name: test udfs
run-name: ${{ github.event.inputs.branch }}
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: DBT Run Environment
required: true
options:
- dev
- prod
- hosted
default: dev
warehouse:
type: choice
description: Snowflake warehouse
required: true
options:
- DBT
- DBT_CLOUD
- XSMALL
default: DBT
schedule:
# Runs “Daily at midnight GMT” (see https://crontab.guru)
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}
jobs:
scheduled:
uses: ./.github/workflows/dbt.yml
if: github.event_name == 'schedule' || github.event_name == 'push'
secrets: inherit
with:
warehouse: ${{ vars.WAREHOUSE }}
environment: prod
command: dbt test --selector test_udfs --threads 24
dispatched:
uses: ./.github/workflows/dbt.yml
if: github.event_name == 'workflow_dispatch'
secrets: inherit
with:
warehouse: ${{ inputs.warehouse }}
environment: ${{ inputs.environment }}
command: dbt test --selector test_udfs --threads 24