Skip to content
Latchkey

Run dbt tests on win workflow (InfuseAI/piperider)

The Run dbt tests on win workflow from InfuseAI/piperider, explained and optimized by Latchkey.

D

CI health: D - needs work

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: InfuseAI/piperider.github/workflows/e2e-windows-tests.yamlLicense Apache-2.0View source

What it does

This is the Run dbt tests on win workflow from the InfuseAI/piperider repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Run dbt tests on win

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
  workflow_dispatch:

jobs:
  build:
    runs-on: windows-latest
    strategy:
      fail-fast: false
      matrix:
        version: [ '3.11' ]
        dbt: [ ">=1.5,<1.6", ">=1.6,<1.7" ]

    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.version }}
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install pytest "dbt-core${{ matrix.dbt }}" "dbt-duckdb${{ matrix.dbt }}"
          pip install '.[duckdb]'

      - name: Run jaffle shop
        run: |
          ./e2e-jaffle-shop/run.bat
          python ./e2e-jaffle-shop/windows-result-checker.py

The same workflow, on Latchkey

Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.

name: Run dbt tests on win
 
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
  workflow_dispatch:
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  build:
    timeout-minutes: 30
    runs-on: windows-latest
    strategy:
      fail-fast: false
      matrix:
        version: [ '3.11' ]
        dbt: [ ">=1.5,<1.6", ">=1.6,<1.7" ]
 
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          cache: 'pip'
          python-version: ${{ matrix.version }}
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install pytest "dbt-core${{ matrix.dbt }}" "dbt-duckdb${{ matrix.dbt }}"
          pip install '.[duckdb]'
 
      - name: Run jaffle shop
        run: |
          ./e2e-jaffle-shop/run.bat
          python ./e2e-jaffle-shop/windows-result-checker.py
 

What changed

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 1 job (2 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow