Bird
0
0

Your team wants to automatically generate and publish dbt documentation only if all tests pass in the PR workflow. How should you structure the GitHub Actions steps?

hard🚀 Application Q9 of 15
dbt - Governance and Collaboration
Your team wants to automatically generate and publish dbt documentation only if all tests pass in the PR workflow. How should you structure the GitHub Actions steps?
ARun dbt test first, then run dbt docs generate and dbt docs serve only if tests succeed
BRun dbt docs generate before dbt test to speed up workflow
CRun dbt docs serve regardless of test results
DRun dbt docs generate and serve in parallel with tests
Step-by-Step Solution
Solution:
  1. Step 1: Understand conditional workflow steps

    Steps after tests should run only if tests succeed to avoid publishing docs for failing code.
  2. Step 2: Structure steps accordingly

    Run dbt test first, then generate and serve docs only if tests pass.
  3. Final Answer:

    Run dbt test first, then run dbt docs generate and dbt docs serve only if tests succeed -> Option A
  4. Quick Check:

    Docs after tests pass = safe publishing [OK]
Quick Trick: Chain docs steps after successful tests [OK]
Common Mistakes:
MISTAKES
  • Generating docs before tests may publish bad docs
  • Serving docs regardless of test results
  • Running docs steps in parallel causes race conditions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes