downstream_tests workflow (holoviz/holoviews)
The downstream_tests workflow from holoviz/holoviews, explained and optimized by Latchkey.
CI health: A - excellent
Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the downstream_tests workflow from the holoviz/holoviews repository, a real project running GitHub Actions. It is shown here with attribution under its BSD-3-Clause license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: downstream_tests
on:
workflow_run: # zizmor: ignore[dangerous-triggers]
workflows: [packages]
types: [completed]
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
downstream_tests:
name: Run downstream tests
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
downstream_repo: [hvplot, geoviews]
fail-fast: false
steps:
- uses: holoviz-dev/holoviz_tasks/downstream-tests@1a9884850782b0b80ba2e91b573e7d63d9d3c3dc # v1.0.1
with:
downstream_repo: ${{ matrix.downstream_repo }}
github_token: ${{ secrets.ACCESS_TOKEN }}
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: downstream_tests on: workflow_run: # zizmor: ignore[dangerous-triggers] workflows: [packages] types: [completed] workflow_dispatch: permissions: {} concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: downstream_tests: timeout-minutes: 30 name: Run downstream tests runs-on: latchkey-small if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} strategy: matrix: downstream_repo: [hvplot, geoviews] fail-fast: false steps: - uses: holoviz-dev/holoviz_tasks/downstream-tests@1a9884850782b0b80ba2e91b573e7d63d9d3c3dc # v1.0.1 with: downstream_repo: ${{ matrix.downstream_repo }} github_token: ${{ secrets.ACCESS_TOKEN }}
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
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.