From 9446c75353e5b4fb371e26016c69dfa3c5ae8802 Mon Sep 17 00:00:00 2001 From: Eric Laurello Date: Wed, 24 Jan 2024 17:56:37 -0500 Subject: [PATCH] fix test task --- .github/workflows/dbt_test_tasks.yml | 39 +++++++--------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/.github/workflows/dbt_test_tasks.yml b/.github/workflows/dbt_test_tasks.yml index 290d3f9..8adb7f5 100644 --- a/.github/workflows/dbt_test_tasks.yml +++ b/.github/workflows/dbt_test_tasks.yml @@ -1,46 +1,27 @@ -name: dbt_test_scheduled -run-name: dbt_test_scheduled +name: dbt_test_tasks +run-name: dbt_test_tasks on: workflow_dispatch: - schedule: - - cron: '0 4 * * *' + branches: + - "main" env: - USE_VARS: "${{ vars.USE_VARS }}" - DBT_PROFILES_DIR: "${{ vars.DBT_PROFILES_DIR }}" - DBT_VERSION: "${{ vars.DBT_VERSION }}" + DBT_PROFILES_DIR: ./ + ACCOUNT: "${{ vars.ACCOUNT }}" ROLE: "${{ vars.ROLE }}" USER: "${{ vars.USER }}" PASSWORD: "${{ secrets.PASSWORD }}" REGION: "${{ vars.REGION }}" DATABASE: "${{ vars.DATABASE }}" - WAREHOUSE: "${{ vars.TEST_WAREHOUSE }}" + WAREHOUSE: "${{ vars.WAREHOUSE }}" SCHEMA: "${{ vars.SCHEMA }}" concurrency: group: ${{ github.workflow }} jobs: - run_dbt_jobs: - runs-on: ubuntu-latest - environment: - name: workflow_prod - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: "${{ vars.PYTHON_VERSION }}" - cache: "pip" - - - name: install dependencies - run: | - pip3 install dbt-snowflake==${{ vars.DBT_VERSION }} cli_passthrough requests click - dbt deps - - name: Run DBT Jobs - run: | - dbt test -m models/bronze models/silver models/gold - + called_workflow_template: + uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_test_tasks.yml@AN-4374/upgrade-dbt-1.7 + secrets: inherit \ No newline at end of file