Livequery integration test gha (#349)

* add dbt.yml and integration test gha's

* update dbt selector to run all integration tests in lq package

* remove fail fast strategy
This commit is contained in:
Shah Newaz Khan 2024-08-14 09:35:41 -07:00 committed by GitHub
parent eb3247ca26
commit bb864a8e87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 78 additions and 0 deletions

59
.github/workflows/dbt.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: dbt
on:
workflow_call:
inputs:
warehouse:
required: false
type: string
environment:
required: true
type: string
command:
required: true
type: string
python_version:
required: false
type: string
default: "3.10"
env:
DBT_PROFILES_DIR: ./
ACCOUNT: ${{ vars.ACCOUNT }}
ROLE: ${{ vars.ROLE }}
USER: ${{ vars.USER }}
PASSWORD: ${{ secrets.PASSWORD }}
REGION: ${{ vars.REGION }}
DATABASE: ${{ vars.DATABASE }}
WAREHOUSE: ${{ inputs.warehouse }}
SCHEMA: ${{ vars.SCHEMA }}
TARGET: ${{ vars.TARGET }}
jobs:
dbt:
runs-on: ubuntu-latest
environment:
name: ${{ inputs.environment }}
env:
WAREHOUSE: ${{ inputs.warehouse || vars.WAREHOUSE }}
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: logs-${{ inputs.environment }}-${{ github.run_number }}-${{ github.run_attempt }}
path: |
logs
target

View File

@ -0,0 +1,19 @@
name: integration test
run-name: ${{ github.event.inputs.branch }}
on:
workflow_dispatch:
concurrency: ${{ github.workflow }}
jobs:
test:
name: livequery_integration_test
uses: ./.github/workflows/dbt.yml
secrets: inherit
with:
warehouse: DBT_CLOUD
environment: ${{ github.ref == 'refs/heads/main' && 'prod' || 'stg' }}
command: dbt test -s 'livequery_models.deploy.core.*'