Skip to content
Latchkey

Cross-OS Tests workflow (release-it/release-it)

The Cross-OS Tests workflow from release-it/release-it, explained and optimized by Latchkey.

D

CI health: D - needs work

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: release-it/release-it.github/workflows/test.ymlLicense MITView source

What it does

This is the Cross-OS Tests workflow from the release-it/release-it 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: Cross-OS Tests

on:
  push:
    branches:
      - '**'
    tags:
      - '!**'
  pull_request:
  workflow_dispatch:

env:
  GITHUB_TOKEN: 1
  GITLAB_TOKEN: 1

permissions:
  contents: read

jobs:
  test:
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
          - macos-latest
        node:
          - 20
          - 22
          - 24
          - 26

    runs-on: ${{ matrix.os }}
    name: ${{ matrix.os }} (Node v${{ matrix.node }})

    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          node-version: ${{ matrix.node }}
      - run: git config --global user.name User
      - run: git config --global user.email user@example.org
      - run: npm install
      - run: npm test

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: Cross-OS Tests
 
on:
  push:
    branches:
      - '**'
    tags:
      - '!**'
  pull_request:
  workflow_dispatch:
 
env:
  GITHUB_TOKEN: 1
  GITLAB_TOKEN: 1
 
permissions:
  contents: read
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  test:
    timeout-minutes: 30
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
          - macos-latest
        node:
          - 20
          - 22
          - 24
          - 26
 
    runs-on: ${{ matrix.os }}
    name: ${{ matrix.os }} (Node v${{ matrix.node }})
 
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          cache: 'npm'
          node-version: ${{ matrix.node }}
      - run: git config --global user.name User
      - run: git config --global user.email user@example.org
      - run: npm install
      - run: npm test
 

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 (12 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