Skip to content
Latchkey

Check Changelog workflow (facebook/jest)

The Check Changelog workflow from facebook/jest, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get 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: facebook/jest.github/workflows/check-changelog.ymlLicense MITView source

What it does

This is the Check Changelog workflow from the facebook/jest 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: Check Changelog

on:
  pull_request:
    types: [opened, synchronize, reopened, labeled, unlabeled]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  check-changelog:
    name: Check Changelog Entry
    runs-on: ubuntu-latest
    if: >-
      github.event.action != 'labeled' && github.event.action != 'unlabeled' || github.event.label.name == 'require-changelog'


    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false
      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          node-version: lts/*
          cache: yarn
      - name: install
        env:
          YARN_ENABLE_SCRIPTS: false
        run: yarn --immutable --mode=skip-build
      - name: check changelog
        if: ${{ !contains(github.event.pull_request.labels.*.name, 'require-changelog') }}
        run: yarn check-changelog
      - name: check changelog entry
        if: ${{ contains(github.event.pull_request.labels.*.name, 'require-changelog') }}
        env:
          PR_NUMBER: ${{ github.event.pull_request.number }}
        run: yarn check-changelog $PR_NUMBER

The same workflow, on Latchkey

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

name: Check Changelog
 
on:
  pull_request:
    types: [opened, synchronize, reopened, labeled, unlabeled]
 
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
  cancel-in-progress: true
 
permissions:
  contents: read
 
jobs:
  check-changelog:
    timeout-minutes: 30
    name: Check Changelog Entry
    runs-on: latchkey-small
    if: >-
      github.event.action != 'labeled' && github.event.action != 'unlabeled' || github.event.label.name == 'require-changelog'
 
 
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false
      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          node-version: lts/*
          cache: yarn
      - name: install
        env:
          YARN_ENABLE_SCRIPTS: false
        run: yarn --immutable --mode=skip-build
      - name: check changelog
        if: ${{ !contains(github.event.pull_request.labels.*.name, 'require-changelog') }}
        run: yarn check-changelog
      - name: check changelog entry
        if: ${{ contains(github.event.pull_request.labels.*.name, 'require-changelog') }}
        env:
          PR_NUMBER: ${{ github.event.pull_request.number }}
        run: yarn check-changelog $PR_NUMBER
 

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 per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow