Skip to content
Latchkey

Test workflow (tighten/ziggy)

The Test workflow from tighten/ziggy, explained and optimized by Latchkey.

B

CI health: B - good

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: tighten/ziggy.github/workflows/test.ymlLicense MITView source

What it does

This is the Test workflow from the tighten/ziggy 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: Test
on:
  pull_request:
    paths-ignore: ['dist/**', '*.md']
  push:
    branches: [2.x, main, ci]
    paths-ignore: ['dist/**', '*.md']
concurrency:
  group: ${{ github.ref_name }}
  cancel-in-progress: true
jobs:
  test:
    name: ${{ matrix.os[0] }}, PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}
    runs-on: ${{ matrix.os[1] }}
    continue-on-error: ${{ matrix.php == 8.6 }}
    strategy:
      matrix:
        os: [[Ubuntu, ubuntu-latest], [Windows, windows-latest]]
        php: [8.2, 8.3, 8.4, 8.5, 8.6]
        laravel: [10, 11, 12, 13]
        exclude:
          - php: 8.5
            laravel: 10
          - php: 8.6
            laravel: 10
          - php: 8.2
            laravel: 13
        include:
          - php: 8.6
            composer: --ignore-platform-req=php+
    steps:
      - uses: actions/checkout@v4
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: fileinfo
      - uses: actions/setup-node@v4
        with:
          node-version: 24
          cache: npm
      - run: composer require laravel/framework:"${{ matrix.laravel }}.*" --no-update --no-interaction
      - uses: ramsey/composer-install@v3
        with:
          composer-options: ${{ matrix.composer }}
      - run: vendor/bin/pest
      - run: npm ci && npm run build
      - run: npm run test

The same workflow, on Latchkey

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

name: Test
on:
  pull_request:
    paths-ignore: ['dist/**', '*.md']
  push:
    branches: [2.x, main, ci]
    paths-ignore: ['dist/**', '*.md']
concurrency:
  group: ${{ github.ref_name }}
  cancel-in-progress: true
jobs:
  test:
    timeout-minutes: 30
    name: ${{ matrix.os[0] }}, PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}
    runs-on: ${{ matrix.os[1] }}
    continue-on-error: ${{ matrix.php == 8.6 }}
    strategy:
      matrix:
        os: [[Ubuntu, ubuntu-latest], [Windows, windows-latest]]
        php: [8.2, 8.3, 8.4, 8.5, 8.6]
        laravel: [10, 11, 12, 13]
        exclude:
          - php: 8.5
            laravel: 10
          - php: 8.6
            laravel: 10
          - php: 8.2
            laravel: 13
        include:
          - php: 8.6
            composer: --ignore-platform-req=php+
    steps:
      - uses: actions/checkout@v4
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: fileinfo
      - uses: actions/setup-node@v4
        with:
          node-version: 24
          cache: npm
      - run: composer require laravel/framework:"${{ matrix.laravel }}.*" --no-update --no-interaction
      - uses: ramsey/composer-install@v3
        with:
          composer-options: ${{ matrix.composer }}
      - run: vendor/bin/pest
      - run: npm ci && npm run build
      - run: npm run test
 

What changed

2 third-party actions are referenced by a movable tag. Pin them 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 (40 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