From 1b5c0e08ef19255b8874ac536064565a227d47f1 Mon Sep 17 00:00:00 2001 From: Austin <93135983+austinFlipside@users.noreply.github.com> Date: Mon, 12 May 2025 10:51:45 -0400 Subject: [PATCH] add int test (#438) --- .github/workflows/dbt_integration_test.yml | 40 ++++++++++++++++++++++ selector.yml | 7 ++++ 2 files changed, 47 insertions(+) create mode 100644 .github/workflows/dbt_integration_test.yml create mode 100644 selector.yml diff --git a/.github/workflows/dbt_integration_test.yml b/.github/workflows/dbt_integration_test.yml new file mode 100644 index 0000000..f46d574 --- /dev/null +++ b/.github/workflows/dbt_integration_test.yml @@ -0,0 +1,40 @@ +name: dbt_run_integration_test +run-name: ${{ github.event.inputs.branch }} + +on: + workflow_dispatch: + inputs: + environment: + required: true + type: string + +concurrency: ${{ github.workflow }} + +jobs: + prepare_vars: + runs-on: ubuntu-latest + environment: + name: ${{ inputs.environment }} + outputs: + warehouse: ${{ steps.set_outputs.outputs.warehouse }} + steps: + - name: Set warehouse output + id: set_outputs + run: | + echo "warehouse=${{ vars.WAREHOUSE }}" >> $GITHUB_OUTPUT + called_workflow_template: + needs: prepare_vars + uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt.yml@main + with: + command: > + dbt test --selector 'integration_tests' + environment: ${{ inputs.environment }} + warehouse: ${{ needs.prepare_vars.outputs.warehouse }} + secrets: inherit + + notify-failure: + needs: [called_workflow_template] + if: failure() + uses: ./.github/workflows/slack_notify.yml + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/selector.yml b/selector.yml new file mode 100644 index 0000000..f43565e --- /dev/null +++ b/selector.yml @@ -0,0 +1,7 @@ +selectors: + - name: integration_tests + description: "Selector for integration tests" + definition: + union: + - method: fqn + value: "livequery_models.deploy.core._utils" \ No newline at end of file