Run ITBench End-To-End Tests workflow (itbench-hub/ITBench)
The Run ITBench End-To-End Tests workflow from itbench-hub/ITBench, explained and optimized by Latchkey.
CI health: B - good
Point runs-on at Latchkey and get job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Run ITBench End-To-End Tests workflow from the itbench-hub/ITBench 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
name: Run ITBench End-To-End Tests
on:
pull_request:
branches:
- main
paths:
- clusters/kind/go.*
- scenarios/sre/project/roles/applications/defaults/main/managers.yaml
- scenarios/sre/project/roles/cluster/defaults/main/versions.yaml
- scenarios/sre/project/roles/executables/defaults/main/versions.yaml
- scenarios/sre/project/roles/tools/defaults/main/managers.yaml
- scenarios/sre/project/manage_applications.yaml
- scenarios/sre/project/manage_faults.yaml
- scenarios/sre/project/manage_recorders.yaml
- scenarios/sre/project/manage_tools.yaml
- scenarios/sre/scripts/inject_scenario_faults.py
- scenarios/sre/Makefile
- pyproject.toml
- requirements.yaml
concurrency:
group: ci-e2e-${{ github.ref }}
cancel-in-progress: true
jobs:
finops:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7.0.0
- uses: astral-sh/setup-uv@v8.3.0
- uses: actions/setup-go@v6.5.0
with:
go-version-file: clusters/kind/go.mod
cache-dependency-path: clusters/kind/go.sum
- uses: azure/setup-helm@v5.0.1
with:
version: v4.2.2
- name: Create Kind cluster
run: |
make -C clusters/kind create-simple-cluster
- name: Run Cloud Provider
run: |
make -C clusters/kind run-service-provider &
sleep 10
- name: Install project dependencies
run: |
make deps
- name: Create group vars
run: |
make -C scenarios/sre group-vars
- name: Start FinOps Scenario 37 # Due to resources, skip deploying recorders
run: |
SCENARIO_NUMBER=37 make -C scenarios/sre create-environment
SCENARIO_NUMBER=37 make -C scenarios/sre inject-scenario-faults
- name: Stop FinOps Scenario 37
run: |
SCENARIO_NUMBER=37 make -C scenarios/sre remove-fault-resources
SCENARIO_NUMBER=37 make -C scenarios/sre destroy-environment
- name: Destroy Kind cluster
run: |
make -C clusters/kind destroy-simple-cluster
sre:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7.0.0
- uses: astral-sh/setup-uv@v8.3.0
- uses: actions/setup-go@v6.5.0
with:
go-version-file: clusters/kind/go.mod
cache-dependency-path: clusters/kind/go.sum
- uses: azure/setup-helm@v5.0.1
with:
version: v4.2.2
- name: Create Kind cluster
run: |
make -C clusters/kind create-simple-cluster
- name: Run Cloud Provider
run: |
make -C clusters/kind run-service-provider &
sleep 10
- name: Install project dependencies
run: |
make deps
- name: Create group vars
run: |
make -C scenarios/sre group-vars
- name: Start SRE Scenario 60
run: |
SCENARIO_NUMBER=60 make -C scenarios/sre start-scenario
- name: Stop SRE Scenario 60
run: |
SCENARIO_NUMBER=60 make -C scenarios/sre stop-scenario
- name: Destroy Kind cluster
run: |
make -C clusters/kind destroy-simple-cluster
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Run ITBench End-To-End Tests on: pull_request: branches: - main paths: - clusters/kind/go.* - scenarios/sre/project/roles/applications/defaults/main/managers.yaml - scenarios/sre/project/roles/cluster/defaults/main/versions.yaml - scenarios/sre/project/roles/executables/defaults/main/versions.yaml - scenarios/sre/project/roles/tools/defaults/main/managers.yaml - scenarios/sre/project/manage_applications.yaml - scenarios/sre/project/manage_faults.yaml - scenarios/sre/project/manage_recorders.yaml - scenarios/sre/project/manage_tools.yaml - scenarios/sre/scripts/inject_scenario_faults.py - scenarios/sre/Makefile - pyproject.toml - requirements.yaml concurrency: group: ci-e2e-${{ github.ref }} cancel-in-progress: true jobs: finops: timeout-minutes: 30 runs-on: latchkey-small steps: - uses: actions/checkout@v7.0.0 - uses: astral-sh/setup-uv@v8.3.0 - uses: actions/setup-go@v6.5.0 with: go-version-file: clusters/kind/go.mod cache-dependency-path: clusters/kind/go.sum - uses: azure/setup-helm@v5.0.1 with: version: v4.2.2 - name: Create Kind cluster run: | make -C clusters/kind create-simple-cluster - name: Run Cloud Provider run: | make -C clusters/kind run-service-provider & sleep 10 - name: Install project dependencies run: | make deps - name: Create group vars run: | make -C scenarios/sre group-vars - name: Start FinOps Scenario 37 # Due to resources, skip deploying recorders run: | SCENARIO_NUMBER=37 make -C scenarios/sre create-environment SCENARIO_NUMBER=37 make -C scenarios/sre inject-scenario-faults - name: Stop FinOps Scenario 37 run: | SCENARIO_NUMBER=37 make -C scenarios/sre remove-fault-resources SCENARIO_NUMBER=37 make -C scenarios/sre destroy-environment - name: Destroy Kind cluster run: | make -C clusters/kind destroy-simple-cluster sre: timeout-minutes: 30 runs-on: latchkey-small steps: - uses: actions/checkout@v7.0.0 - uses: astral-sh/setup-uv@v8.3.0 - uses: actions/setup-go@v6.5.0 with: go-version-file: clusters/kind/go.mod cache-dependency-path: clusters/kind/go.sum - uses: azure/setup-helm@v5.0.1 with: version: v4.2.2 - name: Create Kind cluster run: | make -C clusters/kind create-simple-cluster - name: Run Cloud Provider run: | make -C clusters/kind run-service-provider & sleep 10 - name: Install project dependencies run: | make deps - name: Create group vars run: | make -C scenarios/sre group-vars - name: Start SRE Scenario 60 run: | SCENARIO_NUMBER=60 make -C scenarios/sre start-scenario - name: Stop SRE Scenario 60 run: | SCENARIO_NUMBER=60 make -C scenarios/sre stop-scenario - name: Destroy Kind cluster run: | make -C clusters/kind destroy-simple-cluster
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.
2 third-party actions are referenced by a movable tag. Pin them to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
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:
- End-to-end and browser tests
This workflow runs 2 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.