Add test workflow (#23)

* modify test

* add test daily workflow

---------

Co-authored-by: desmond-hui <desmond@flipsidecryto.com>
This commit is contained in:
desmond-hui 2024-09-18 06:42:28 -07:00 committed by GitHub
parent 90714d0ae7
commit 23a28d8ed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 47 additions and 0 deletions

45
.github/workflows/dbt_test_daily.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: dbt_test_daily
run-name: dbt_test_daily
on:
workflow_dispatch:
schedule:
# Run at 8:19am UTC daily (see https://crontab.guru)
- cron: '19 8 * * *'
env:
DBT_PROFILES_DIR: "${{ vars.DBT_PROFILES_DIR }}"
ACCOUNT: "${{ vars.ACCOUNT }}"
ROLE: "${{ vars.ROLE }}"
USER: "${{ vars.USER }}"
PASSWORD: "${{ secrets.PASSWORD }}"
REGION: "${{ vars.REGION }}"
DATABASE: "${{ vars.DATABASE }}"
WAREHOUSE: "${{ vars.WAREHOUSE }}"
SCHEMA: "${{ vars.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@v4
with:
python-version: "${{ vars.PYTHON_VERSION }}"
cache: "pip"
- name: install dependencies
run: |
pip install -r requirements.txt
dbt deps
- name: Run DBT Jobs
run: |
dbt test -s "eclipse_models,tag:scheduled_core" "eclipse_models,tag:scheduled_non_core"

View File

@ -42,3 +42,5 @@ SELECT
gap_end_block_id - gap_start_block_id AS diff
FROM
gaps
WHERE
gap_end_block_id <> 6572202 /* we know that blocks 0 to 6572202 is currently unavailable */