Skip to content

Commit

Permalink
raise Exception when fails
Browse files Browse the repository at this point in the history
  • Loading branch information
laura-l-amaral committed Sep 28, 2023
1 parent 629aebb commit 875cac6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/scripts/table_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,11 @@ def get_materialization_flow_id(backend: Backend, auth_token: str):
auth_token=args.prefect_backend_token,
)

if test_results['warn'] > 1:
print(f"Test got {test_results['warn']} warns")
if test_results['warn'] > 0:
raise Exception(
f"Test got {test_results['warn']} warns"
f"Check the logs at {args.prefect_base_url}/flow-run/{launched_flow_run_id}"
)

else:
print(f"{test_results['pass']} tests passed")
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_dbt_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- '.github/workflows/test_dbt_model.yaml'

jobs:
sync-dbt-schema:
test_dbt_model:
if: contains(github.event.pull_request.labels.*.name, 'test-dev-model')
name: Test DBT dev model
runs-on: ubuntu-latest
Expand Down

0 comments on commit 875cac6

Please sign in to comment.