mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 14:26:52 +00:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: dbt_test_scheduled
|
|
run-name: dbt_test_scheduled
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# Run at 1600 UTC daily (see https://crontab.guru)
|
|
- cron: '0 16 * * *'
|
|
env:
|
|
DBT_PROFILES_DIR: "${{ secrets.DBT_PROFILES_DIR }}"
|
|
DBT_VERSION: "${{ secrets.DBT_VERSION }}"
|
|
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
|
|
ACCOUNT: "${{ secrets.ACCOUNT }}"
|
|
ROLE: "${{ secrets.ROLE }}"
|
|
USER: "${{ secrets.USER }}"
|
|
PASSWORD: "${{ secrets.PASSWORD }}"
|
|
REGION: "${{ secrets.REGION }}"
|
|
DATABASE: "${{ secrets.DATABASE }}"
|
|
WAREHOUSE: "${{ secrets.WAREHOUSE }}"
|
|
SCHEMA: "${{ secrets.SCHEMA }}"
|
|
|
|
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==${{ secrets.DBT_VERSION }} cli_passthrough requests click
|
|
dbt deps
|
|
- name: Run DBT Jobs
|
|
run: |
|
|
dbt test
|
|
continue-on-error: true
|
|
|
|
- name: Log test results
|
|
run: |
|
|
python python_scripts/test_alert/dbt_test_alert.py
|