Skip to content
Latchkey

run workflow (drgrib/dotmap)

The run workflow from drgrib/dotmap, explained and optimized by Latchkey.

A

CI health: A - excellent

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

Grade your own workflow free or run it on Latchkey →
Source: drgrib/dotmap.github/workflows/tests.ymlLicense MITView source

What it does

This is the run workflow from the drgrib/dotmap repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

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

The workflow

workflow (.yml)
name: run

on: [push, pull_request]

jobs:
  tests:
    runs-on: ubuntu-latest
    container: ${{ matrix.container }}
    strategy:
      matrix:
        container:
          - python:3.6
          - python:3.7
          - python:3.8
          - python:3.9
          - python:3.10
          - python:3.11
          - python:3.12
          - python:3.13
          - python:3.14
          - pypy:3.8
          - pypy:3.9
          - pypy:3.10
          - pypy:3.11
    timeout-minutes: 10

    steps:
      - uses: actions/checkout@v6
      - run: |
          python3 -m unittest

The same workflow, on Latchkey

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

name: run
 
on: [push, pull_request]
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  tests:
    runs-on: latchkey-small
    container: ${{ matrix.container }}
    strategy:
      matrix:
        container:
          - python:3.6
          - python:3.7
          - python:3.8
          - python:3.9
          - python:3.10
          - python:3.11
          - python:3.12
          - python:3.13
          - python:3.14
          - pypy:3.8
          - pypy:3.9
          - pypy:3.10
          - pypy:3.11
    timeout-minutes: 10
 
    steps:
      - uses: actions/checkout@v6
      - run: |
          python3 -m unittest
 

What changed

This workflow runs 1 job (13 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