Update HCPCS code test, add threshold for PMPM (#1008) #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate and Deploy dbt Docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.yml' | |
- '**.yaml' | |
- '**.sql' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
env: | |
PYTHON_VERSION: '3.9' | |
####### Secrets ####### | |
####### Snowflake | |
DBT_TUVA_SNOWFLAKE_ACCOUNT: ${{ secrets.DBT_TUVA_SNOWFLAKE_ACCOUNT }} | |
DBT_TUVA_CI_DATABASE: ${{ secrets.DBT_TUVA_CI_DATABASE }} | |
DBT_SNOWFLAKE_CI_PASSWORD: ${{ secrets.DBT_SNOWFLAKE_CI_PASSWORD }} | |
DBT_SNOWFLAKE_CI_ROLE: ${{ secrets.DBT_SNOWFLAKE_CI_ROLE }} | |
DBT_SNOWFLAKE_CI_SCHEMA: ${{ secrets.DBT_SNOWFLAKE_CI_SCHEMA }} | |
DBT_SNOWFLAKE_CI_USER: ${{ secrets.DBT_SNOWFLAKE_CI_USER }} | |
DBT_SNOWFLAKE_CI_WAREHOUSE: ${{ secrets.DBT_SNOWFLAKE_CI_WAREHOUSE }} | |
jobs: | |
generate-docs: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./integration_tests/docs_generate | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dbt-core and Snowflake adapter | |
run: | | |
python -m pip install --upgrade pip | |
pip install dbt-core==1.8.6 dbt-snowflake | |
# --- Setup dbt Profile --- | |
- name: Create dbt profiles directory in working directory | |
run: mkdir -p .dbt | |
- name: Create dbt profiles.yml for Snowflake (for docs context) | |
run: | | |
echo "default: | |
outputs: | |
dev: | |
account: \"{{ env_var('DBT_TUVA_SNOWFLAKE_ACCOUNT') }}\" | |
database: dev_ci_testing | |
password: \"{{ env_var('DBT_SNOWFLAKE_CI_PASSWORD') }}\" | |
role: \"{{ env_var('DBT_SNOWFLAKE_CI_ROLE') }}\" | |
schema: \"{{ env_var('DBT_SNOWFLAKE_CI_SCHEMA') }}\" | |
threads: 8 | |
type: snowflake | |
user: \"{{ env_var('DBT_SNOWFLAKE_CI_USER') }}\" | |
warehouse: \"{{ env_var('DBT_SNOWFLAKE_CI_WAREHOUSE') }}\" | |
target: dev" > .dbt/profiles.yml | |
- name: Verify profiles.yml exists | |
run: | | |
echo "Current working directory: $(pwd)" | |
echo "Contents of .dbt directory:" | |
ls -la .dbt/ | |
echo "Contents of profiles.yml:" | |
cat .dbt/profiles.yml | |
- name: dbt-deps | |
run: dbt deps --profiles-dir .dbt | |
- name: dbt-debug | |
run: dbt debug --profiles-dir .dbt | |
- name: dbt-build | |
run: dbt build --profiles-dir .dbt | |
- name: dbt-docs-generate | |
run: dbt docs generate --profiles-dir .dbt | |
- name: Verify target directory was created | |
run: | | |
echo "Contents of current directory:" | |
ls -la | |
echo "Contents of target directory:" | |
ls -la target/ | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './integration_tests/docs_generate/target' | |
deploy: | |
needs: generate-docs | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |