mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 11:26:53 +00:00
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:
parent
eb3247ca26
commit
bb864a8e87
59
.github/workflows/dbt.yml
vendored
Normal file
59
.github/workflows/dbt.yml
vendored
Normal 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
|
||||
19
.github/workflows/dbt_integration_test.yml
vendored
Normal file
19
.github/workflows/dbt_integration_test.yml
vendored
Normal 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.*'
|
||||
Loading…
Reference in New Issue
Block a user