Skip to content
Latchkey

Verify changes workflow (style-dictionary/style-dictionary)

The Verify changes workflow from style-dictionary/style-dictionary, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get 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: style-dictionary/style-dictionary.github/workflows/verify.ymlLicense Apache-2.0View source

What it does

This is the Verify changes workflow from the style-dictionary/style-dictionary 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

workflow (.yml)
name: Verify changes

on: pull_request

jobs:
  verify:
    name: Verify changes
    strategy:
      matrix:
        # latest node & minimum node according to pkg.json engines
        node-version: [22.0, lts/*]
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{matrix.os}}
    steps:
      - name: Set git to use LF
        run: |
          git config --global core.autocrlf false
          git config --global core.eol lf

      - uses: actions/checkout@v4

      - name: Setup Node ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'npm'

      - name: Install Dependencies
        run: npm ci

      - name: Linting & Formatting
        run: npm run lint

      - name: Node tests
        run: npm run test:node

      - name: Install chromium
        run: npx playwright install --with-deps chromium

      - name: Browser tests
        run: npm run test

      - name: Performance tests
        run: npm run test:perf
  verify-strip-types:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node 22.6.0
        uses: actions/setup-node@v4
        with:
          node-version: 22.6.0
          cache: 'npm'

      - name: Install Dependencies
        run: npm ci

      - name: Node Strip types tests
        run: npm run test:strip-types

The same workflow, on Latchkey

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

name: Verify changes
 
on: pull_request
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  verify:
    timeout-minutes: 30
    name: Verify changes
    strategy:
      matrix:
        # latest node & minimum node according to pkg.json engines
        node-version: [22.0, lts/*]
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{matrix.os}}
    steps:
      - name: Set git to use LF
        run: |
          git config --global core.autocrlf false
          git config --global core.eol lf
 
      - uses: actions/checkout@v4
 
      - name: Setup Node ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'npm'
 
      - name: Install Dependencies
        run: npm ci
 
      - name: Linting & Formatting
        run: npm run lint
 
      - name: Node tests
        run: npm run test:node
 
      - name: Install chromium
        run: npx playwright install --with-deps chromium
 
      - name: Browser tests
        run: npm run test
 
      - name: Performance tests
        run: npm run test:perf
  verify-strip-types:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@v4
 
      - name: Setup Node 22.6.0
        uses: actions/setup-node@v4
        with:
          node-version: 22.6.0
          cache: 'npm'
 
      - name: Install Dependencies
        run: npm ci
 
      - name: Node Strip types tests
        run: npm run test:strip-types
 

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 2 jobs (5 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