Add unit tests across all models#1293
Open
chase-jones wants to merge 4 commits intomainfrom
Open
Conversation
- Fix CCSR staging model to SELECT DISTINCT, preventing duplicate ccsr_category_rank=1 records when claims have multiple line items with the same diagnosis code - Add local DuckDB profile for running tests without MotherDuck - Add 826 unit tests across all data marts, core, claims preprocessing, input layer, normalization, and data quality models - All 826 tests pass on DuckDB with zero errors - Unit tests disabled by default via tuva_unit_tests_enabled var so they don't run in customer pipelines; set tuva_unit_tests_enabled: true to enable - Add GitHub Actions workflow for unit tests on PRs (DuckDB-based) - Add CI check that warns when new models lack unit test coverage
✅ Deploy Preview for thetuvaproject canceled.
|
The normalize staging models require enable_normalize_engine var which defaults to false. dbt 1.10 raises a parse error when unit tests reference disabled models, even if the tests themselves are disabled.
The chronic_conditions__cms_chronic_conditions_wide model fails with dbt run --empty because the pivot macro receives no rows. This doesn't affect unit tests (920/921 models build fine) but would fail the CI step.
Member
Author
|
/ci medium |
|
Unsupported warehouse |
Member
Author
|
/ci snowflake dbt run |
Member
Author
|
/ci snowflake dbt test |
|
Triggered Tuva CI with |
|
Triggered Tuva CI with |
Member
Author
|
/ci snowflake dbt build --full-refresh |
|
Triggered Tuva CI with |
Collaborator
|
the distinct on CCSR doesn't fix this problem (and it's not clear it actually is a problem per slack thread) and should be reverted |
chase-jones
commented
Mar 30, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.