Update GitHub Actions workflow for dbt integration tests

- Renamed the workflow to 'dbt_run_integration_test' for clarity.
- Removed the scheduled cron job to simplify the workflow.
- Updated the job to use a template from FlipsideCrypto for better maintainability.
- Adjusted the command to run integration tests using a selector.
- Enhanced environment handling based on the branch context.
This commit is contained in:
Jensen Yap 2025-09-02 22:17:48 +09:00
parent 430bc25db1
commit cf5fb8b991

View File

@ -1,28 +1,17 @@
name: integration test
name: dbt_run_integration_test
run-name: ${{ github.event.inputs.branch }}
on:
workflow_dispatch:
schedule:
# Runs “Daily at midnight GMT” (see https://crontab.guru)
- cron: '0 0 * * *'
concurrency: ${{ github.workflow }}
jobs:
test:
name: ${{ matrix.environment }}
uses: ./.github/workflows/dbt.yml
secrets: inherit
strategy:
fail-fast: false
matrix:
include:
- environment: hosted
warehouse: XSMALL
- environment: prod
warehouse: DBT_CLOUD
called_workflow_template:
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt.yml@main
with:
warehouse: ${{ matrix.warehouse }}
environment: ${{ matrix.environment }}
command: dbt test -s test___utils_udf_introspect
command: >
dbt test --selector 'integration_tests'
environment: ${{ github.ref == 'refs/heads/main' && 'workflow_prod' || 'workflow_dev' }}
warehouse: ${{ vars.WAREHOUSE }}
secrets: inherit