Skip to content
Latchkey

Continuous Integration workflow (jekyll/jekyll-admin)

The Continuous Integration workflow from jekyll/jekyll-admin, explained and optimized by Latchkey.

C

CI health: C - fair

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: jekyll/jekyll-admin.github/workflows/ci.ymlLicense MITView source

What it does

This is the Continuous Integration workflow from the jekyll/jekyll-admin 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: Continuous Integration

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  ruby:
    name: "Test Backend (Jekyll ${{ matrix.jekyll_version }}, Ruby ${{ matrix.ruby_version }})"
    runs-on: "ubuntu-latest"
    env:
      JEKYLL_VERSION: ${{ matrix.jekyll_version }}
      JEKYLL_LOG_LEVEL: warn
      RACK_ENV: test
    strategy:
      fail-fast: false
      matrix:
        ruby_version: ["2.7", "3.3", "3.4"]
        jekyll_version:
          - "~> 3.9"
          - "~> 4.0"
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4
      - name: "Set up Ruby ${{ matrix.ruby_version }}"
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby_version }}
          bundler-cache: true
      - name: Unit Tests
        run: bundle exec rspec --format documentation --force-color --backtrace

  node:
    name: "Test Frontend (Node ${{ matrix.node_version }})"
    runs-on: "ubuntu-latest"
    strategy:
      fail-fast: false
      matrix:
        node_version: ["12"]
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4
      - name: "Set up Node ${{ matrix.node_version }}"
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node_version }}
          cache: "yarn"
      - name: Install Dependencies
        run: yarn install
      - name: Run tests and build frontend
        run: bash script/build

The same workflow, on Latchkey

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

name: Continuous Integration
 
on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  ruby:
    timeout-minutes: 30
    name: "Test Backend (Jekyll ${{ matrix.jekyll_version }}, Ruby ${{ matrix.ruby_version }})"
    runs-on: "ubuntu-latest"
    env:
      JEKYLL_VERSION: ${{ matrix.jekyll_version }}
      JEKYLL_LOG_LEVEL: warn
      RACK_ENV: test
    strategy:
      fail-fast: false
      matrix:
        ruby_version: ["2.7", "3.3", "3.4"]
        jekyll_version:
          - "~> 3.9"
          - "~> 4.0"
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4
      - name: "Set up Ruby ${{ matrix.ruby_version }}"
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby_version }}
          bundler-cache: true
      - name: Unit Tests
        run: bundle exec rspec --format documentation --force-color --backtrace
 
  node:
    timeout-minutes: 30
    name: "Test Frontend (Node ${{ matrix.node_version }})"
    runs-on: "ubuntu-latest"
    strategy:
      fail-fast: false
      matrix:
        node_version: ["12"]
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4
      - name: "Set up Node ${{ matrix.node_version }}"
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node_version }}
          cache: "yarn"
      - name: Install Dependencies
        run: yarn install
      - name: Run tests and build frontend
        run: bash script/build
 

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