Skip to content
Latchkey

ci workflow (conventional-changelog/standard-version)

The ci workflow from conventional-changelog/standard-version, explained and optimized by Latchkey.

F

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 →
Source: conventional-changelog/standard-version.github/workflows/ci.yamlLicense ISCView source

What it does

This is the ci workflow from the conventional-changelog/standard-version repository, a real project running GitHub Actions. It is shown here with attribution under its ISC license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
on:
  push:
    branches:
      - master
  pull_request:
    types: [ assigned, opened, synchronize, reopened, labeled ]
name: ci
jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node: [10, 12, 14]
        os: [ubuntu-latest, windows-latest]
    env:
        OS: ${{ matrix.os }}
        NODE_VERSION: ${{ matrix.node }}
    steps:
      - uses: actions/checkout@v4
      - run: git fetch --prune --unshallow
      - run: git config --global user.name 'Actions'
      - run: git config --global user.email 'dummy@example.org'
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node }}
      - run: node --version
      - run: npm install --engine-strict
      - run: npm test
      - run: npm run coverage
      - name: Codecov
        uses: codecov/codecov-action@v2
        with:
          env_vars: OS, NODE_VERSION

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.

on:
  push:
    branches:
      - master
  pull_request:
    types: [ assigned, opened, synchronize, reopened, labeled ]
name: ci
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  test:
    timeout-minutes: 30
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node: [10, 12, 14]
        os: [ubuntu-latest, windows-latest]
    env:
        OS: ${{ matrix.os }}
        NODE_VERSION: ${{ matrix.node }}
    steps:
      - uses: actions/checkout@v4
      - run: git fetch --prune --unshallow
      - run: git config --global user.name 'Actions'
      - run: git config --global user.email 'dummy@example.org'
      - uses: actions/setup-node@v2
        with:
          cache: 'npm'
          node-version: ${{ matrix.node }}
      - run: node --version
      - run: npm install --engine-strict
      - run: npm test
      - run: npm run coverage
      - name: Codecov
        uses: codecov/codecov-action@v2
        with:
          env_vars: OS, NODE_VERSION
 

What changed

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:

This workflow runs 1 job (6 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