Skip to content
Latchkey

Run Integration Tests workflow (offen/docker-volume-backup)

The Run Integration Tests workflow from offen/docker-volume-backup, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get run de-duplication, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: offen/docker-volume-backup.github/workflows/test.ymlLicense MPL-2.0View source

What it does

This is the Run Integration Tests workflow from the offen/docker-volume-backup repository, a real project running GitHub Actions. It is shown here with attribution under its MPL-2.0 license.

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

The workflow

workflow (.yml)
name: Run Integration Tests

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  test:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4

      - name: Log in to Docker Hub
        uses: docker/login-action@v2
        continue-on-error: true
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Run Tests
        env:
          DOCKER_CONFIG_FILE: /home/runner/.docker/config.json
        working-directory: ./test
        run: |
          BUILD_IMAGE=1 ./test.sh

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Run Integration Tests
 
on:
  push:
    branches:
      - main
  pull_request:
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  test:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@v4
 
      - name: Log in to Docker Hub
        uses: docker/login-action@v2
        continue-on-error: true
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}
 
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
 
      - name: Run Tests
        env:
          DOCKER_CONFIG_FILE: /home/runner/.docker/config.json
        working-directory: ./test
        run: |
          BUILD_IMAGE=1 ./test.sh
 

What changed

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:

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

Actions used in this workflow