Skip to content
Latchkey

Tests workflow (geezacoleman/OpenWeedLocator)

The Tests workflow from geezacoleman/OpenWeedLocator, explained and optimized by Latchkey.

D

CI health: D - needs work

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

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

What it does

This is the Tests workflow from the geezacoleman/OpenWeedLocator 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: Tests

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Install dependencies
        run: |
          pip install pytest flask paho-mqtt opencv-python-headless numpy pandas Pillow matplotlib psutil

      - name: Create runtime stubs
        run: |
          mkdir -p custom_algorithms
          touch custom_algorithms/__init__.py

      - name: Run tests
        run: |
          pytest tests/ -v --tb=short \
            --ignore=tests/test_agent_engine.py \
            --ignore=tests/test_agent_integration.py \
            --ignore=tests/test_agent_networked.py \
            --ignore=tests/test_agent_vision.py \
            --ignore=tests/test_llm_provider.py \
            --ignore=tests/test_tool_registry.py \
            --ignore=tests/test_widget_manager.py \
            --ignore=tests/test_custom_algorithms.py \
            --ignore=tests/test_speed_actuation_integration.py \
            --ignore=tests/test_greenongreen.py \
            --ignore=tests/test_actuation.py \
            --ignore=tests/test_model_manager.py \
            --ignore=tests/test_mqtt_reconnect.py \
            --ignore=tests/test_mqtt_state_sync.py \
            --ignore=tests/test_networked_routes.py \
            --ignore=tests/test_standalone_routes.py \
            --ignore=tests/test_downloads.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: Tests
 
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  test:
    timeout-minutes: 30
    runs-on: latchkey-small
 
    steps:
      - uses: actions/checkout@v4
 
      - uses: actions/setup-python@v5
        with:
          cache: 'pip'
          python-version: '3.11'
 
      - name: Install dependencies
        run: |
          pip install pytest flask paho-mqtt opencv-python-headless numpy pandas Pillow matplotlib psutil
 
      - name: Create runtime stubs
        run: |
          mkdir -p custom_algorithms
          touch custom_algorithms/__init__.py
 
      - name: Run tests
        run: |
          pytest tests/ -v --tb=short \
            --ignore=tests/test_agent_engine.py \
            --ignore=tests/test_agent_integration.py \
            --ignore=tests/test_agent_networked.py \
            --ignore=tests/test_agent_vision.py \
            --ignore=tests/test_llm_provider.py \
            --ignore=tests/test_tool_registry.py \
            --ignore=tests/test_widget_manager.py \
            --ignore=tests/test_custom_algorithms.py \
            --ignore=tests/test_speed_actuation_integration.py \
            --ignore=tests/test_greenongreen.py \
            --ignore=tests/test_actuation.py \
            --ignore=tests/test_model_manager.py \
            --ignore=tests/test_mqtt_reconnect.py \
            --ignore=tests/test_mqtt_state_sync.py \
            --ignore=tests/test_networked_routes.py \
            --ignore=tests/test_standalone_routes.py \
            --ignore=tests/test_downloads.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 per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow