Action workflow (wntrblm/nox)
The Action workflow from wntrblm/nox, explained and optimized by Latchkey.
CI health: F - at risk
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 Action workflow from the wntrblm/nox 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: Action
on:
push:
branches:
- "main"
- "**action**"
pull_request:
paths:
- ".github/workflows/action.yml"
- ".github/action_helper.py"
- "action.yml"
workflow_dispatch:
# allow manual runs on branches without a PR
env:
FORCE_COLOR: "1"
permissions: {}
jobs:
action-default-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-24.04
- ubuntu-24.04-arm
- windows-2022
- windows-2025
- windows-11-arm
- macos-15-intel
- macos-15
steps:
- uses: actions/checkout@v7.0.0
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v8.2.0
- uses: ./
- run: nox --session github_actions_default_tests
action-all-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: 3.12
- uses: ./
with:
python-versions: "pypy-2.7, pypy-3.8, pypy-3.9, pypy-3.10, pypy-3.11, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, 3.15, 3.13t, 3.14t, 3.15t"
- run: nox --session github_actions_all_tests
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: Action on: push: branches: - "main" - "**action**" pull_request: paths: - ".github/workflows/action.yml" - ".github/action_helper.py" - "action.yml" workflow_dispatch: # allow manual runs on branches without a PR env: FORCE_COLOR: "1" permissions: {} concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: action-default-tests: timeout-minutes: 30 runs-on: ${{ matrix.os }} strategy: matrix: os: - ubuntu-24.04 - ubuntu-24.04-arm - windows-2022 - windows-2025 - windows-11-arm - macos-15-intel - macos-15 steps: - uses: actions/checkout@v7.0.0 with: persist-credentials: false - uses: astral-sh/setup-uv@v8.2.0 - uses: ./ - run: nox --session github_actions_default_tests action-all-tests: timeout-minutes: 30 runs-on: windows-latest steps: - uses: actions/checkout@v7.0.0 with: persist-credentials: false - uses: actions/setup-python@v6 with: cache: 'pip' python-version: 3.12 - uses: ./ with: python-versions: "pypy-2.7, pypy-3.8, pypy-3.9, pypy-3.10, pypy-3.11, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, 3.15, 3.13t, 3.14t, 3.15t" - run: nox --session github_actions_all_tests
What changed
- Cancel superseded runs when a branch or PR gets a newer push.
- Cache dependency installs on the setup step so they are served from cache.
- 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.
This workflow runs 2 jobs (8 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.