Skip to content

analysis

analysis #321

Workflow file for this run

name: analysis
on:
push:
branches: [ main ]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
env:
DBT_PROFILES_DIR: ${{ github.workspace }}
RE_DATA_CONFIG_DIR: ${{ github.workspace }}
RE_DATA_SEND_ANONYMOUS_USAGE_STATS: 0
RE_CLOUD_API_KEY: ${{ secrets.RE_CLOUD_API_KEY }}
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_DBT_PASSWORD: ${{ secrets.SNOWFLAKE_DBT_PASSWORD }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v1
with:
python-version: "3.7.x"
- name: Install re_data and python dependencies
run: |
pip install dbt-core==1.4
pip install dbt-snowflake==1.4
pip install re_data
pip install re_cloud
- name: Run dbt
run: |
dbt --version
dbt deps
dbt run
re_data run
- name: Generate dbt docs
run: |
dbt docs generate
- name: Generate re_data overview
run: |
re_data overview generate
- name: Configure re_data.yml for re_cloud production
uses: mikefarah/yq@master
with:
cmd: |
yq -i '.re_cloud.api_key = "${{secrets.RE_CLOUD_API_KEY}}"' re_data.yml
- name: Upload dbt docs and re_data to production cloud
run: |
re_cloud upload dbt-docs --name analytics-docs
re_cloud upload re-data --name analytics-report
re_cloud upload html-file --name github-actions-summary --file github_actions_url.html
re_cloud upload html-file --name dbt-logs --file logs_file.html
re_cloud upload html-file --name snowflake-queries --file snowflake_logs.html
re_cloud upload html-file --name snowflake-costs --file snowflake_cost.html
shell: bash
- name: Configure re_data.yml for re_cloud testing
uses: mikefarah/yq@master
with:
cmd: |
yq -i '.re_cloud.api_key = "${{secrets.RE_CLOUD_TEST_API_KEY}}"' re_data.yml
yq -i '.re_cloud.base_url = "https://test.getre.io"' re_data.yml
- name: Upload dbt docs to testing cloud
run: |
re_cloud upload dbt-docs --name analytics-docs
re_cloud upload re-data --name analytics-report
re_cloud upload html-file --name github-actions-summary --file github_actions_url.html
re_cloud upload html-file --name dbt-logs --file logs_file.html
re_cloud upload html-file --name snowflake-queries --file snowflake_logs.html
re_cloud upload html-file --name snowflake-costs --file snowflake_cost.html