mirror of
https://github.com/FlipsideCrypto/aurora-models.git
synced 2026-02-06 13:46:43 +00:00
add: test workflow for aurora
This commit is contained in:
parent
77787e81b6
commit
d1d36fee5b
50
.github/workflows/dbt_test_daily.yml
vendored
Normal file
50
.github/workflows/dbt_test_daily.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
name: dbt_test_scheduled
|
||||
run-name: dbt_test_scheduled
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
#schedule:
|
||||
# Run at 1600 UTC daily (see https://crontab.guru)
|
||||
#- cron: "0 9 * * *"
|
||||
env:
|
||||
USE_VARS: "${{ vars.USE_VARS }}"
|
||||
DBT_PROFILES_DIR: "${{ vars.DBT_PROFILES_DIR }}"
|
||||
DBT_VERSION: "${{ vars.DBT_VERSION }}"
|
||||
ACCOUNT: "${{ vars.ACCOUNT }}"
|
||||
ROLE: "${{ vars.ROLE }}"
|
||||
USER: "${{ vars.USER }}"
|
||||
PASSWORD: "${{ secrets.PASSWORD }}"
|
||||
REGION: "${{ vars.REGION }}"
|
||||
DATABASE: "${{ vars.DATABASE }}"
|
||||
WAREHOUSE: "${{ vars.WAREHOUSE }}"
|
||||
SCHEMA: "${{ vars.SCHEMA }}"
|
||||
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
|
||||
|
||||
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@v1
|
||||
with:
|
||||
python-version: "3.7.x"
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
pip3 install dbt-snowflake==${{ env.DBT_VERSION }} cli_passthrough requests click
|
||||
dbt deps
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt test --exclude tag:full_test --models tag:recent_test
|
||||
continue-on-error: true
|
||||
|
||||
- name: Log test results
|
||||
run: |
|
||||
python python_scripts/test_alert/dbt_test_alert.py
|
||||
50
.github/workflows/dbt_test_weekly.yml
vendored
Normal file
50
.github/workflows/dbt_test_weekly.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
name: dbt_test_scheduled
|
||||
run-name: dbt_test_scheduled
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
#schedule:
|
||||
# Run at 1600 UTC Monday (see https://crontab.guru)
|
||||
#- cron: "0 9 * * 1"
|
||||
env:
|
||||
USE_VARS: "${{ vars.USE_VARS }}"
|
||||
DBT_PROFILES_DIR: "${{ vars.DBT_PROFILES_DIR }}"
|
||||
DBT_VERSION: "${{ vars.DBT_VERSION }}"
|
||||
ACCOUNT: "${{ vars.ACCOUNT }}"
|
||||
ROLE: "${{ vars.ROLE }}"
|
||||
USER: "${{ vars.USER }}"
|
||||
PASSWORD: "${{ secrets.PASSWORD }}"
|
||||
REGION: "${{ vars.REGION }}"
|
||||
DATABASE: "${{ vars.DATABASE }}"
|
||||
WAREHOUSE: "${{ vars.WAREHOUSE }}"
|
||||
SCHEMA: "${{ vars.SCHEMA }}"
|
||||
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
|
||||
|
||||
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@v1
|
||||
with:
|
||||
python-version: "3.7.x"
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
pip3 install dbt-snowflake==${{ env.DBT_VERSION }} cli_passthrough requests click
|
||||
dbt deps
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt test --exclude tag:recent_test --models tag:full_test
|
||||
continue-on-error: true
|
||||
|
||||
- name: Log test results
|
||||
run: |
|
||||
python python_scripts/test_alert/dbt_test_alert.py
|
||||
Loading…
Reference in New Issue
Block a user