CI workflow (nwutils/Web2Executable)
The CI workflow from nwutils/Web2Executable, explained and optimized by Latchkey.
CI health: B - good
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the CI workflow from the nwutils/Web2Executable 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
name: CI
on:
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [macos-15, ubuntu-24.04, windows-2025]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-python@v5.6.0
with:
python-version: '3.13.0'
cache: pip
- if: matrix.os == 'ubuntu-24.04'
uses: awalsh128/cache-apt-pkgs-action@v1.5.1
with:
packages: libegl1
version: 1.0
- run: python -m pip install -r requirements.txt
# - run: python -m pylint ./**/*.py
- run: python -m pytest
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: CI on: pull_request: branches: [ main ] concurrency: group: ${{ github.ref }} cancel-in-progress: true jobs: test: timeout-minutes: 30 strategy: matrix: os: [macos-15, ubuntu-24.04, windows-2025] fail-fast: false runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4.2.2 - uses: actions/setup-python@v5.6.0 with: python-version: '3.13.0' cache: pip - if: matrix.os == 'ubuntu-24.04' uses: awalsh128/cache-apt-pkgs-action@v1.5.1 with: packages: libegl1 version: 1.0 - run: python -m pip install -r requirements.txt # - run: python -m pylint ./**/*.py - run: python -m pytest
What changed
- Add a job timeout so a hung step cannot burn hours of runner time.
1 third-party action is referenced by a movable tag. Pin it 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:
- Dependency installs
This workflow runs 1 job (3 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.