Complete the code to run dbt tests after a pull request is created.
steps:
- name: Run dbt tests
run: dbt [1]The dbt test command runs tests on your models to check data quality after changes.
Complete the code to trigger dbt run only on changed models in the PR.
steps:
- name: Run changed models
run: dbt run --models [1]The --models changed selector runs only models changed in the current git diff.
Fix the error in the GitHub Actions step to cache dbt dependencies.
steps:
- name: Cache dbt deps
uses: actions/cache@v3
with:
path: ~/.dbt[1]
key: ${{ runner.os }}-dbt-deps-[2]The dbt dependencies are stored in ~/.dbt/deps. The cache key should hash packages.yml to detect changes.
Fill both blanks to create a job that runs dbt seed and then dbt run.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install dbt
- name: Seed data
run: dbt [1]
- name: Run models
run: dbt [2]dbt seed loads CSV seed files into the database. dbt run runs the models.
Fill all three blanks to create a workflow that installs dbt, caches dependencies, and runs tests.
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache dbt deps
uses: actions/cache@v3
with:
path: ~/.dbt/[1]
key: ${{ runner.os }}-dbt-deps-[2]
- name: Install dbt
run: pip install [3]
- name: Run tests
run: dbt testThe dependencies folder is deps. The cache key hashes packages.yml. The package to install is dbt.