Skip to content
Latchkey

audit workflow (sveltejs/kit)

The audit workflow from sveltejs/kit, 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: sveltejs/kit.github/workflows/audit.ymlLicense MITView source

What it does

This is the audit workflow from the sveltejs/kit 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: audit

on:
  schedule:
    - cron: "0 5 * * *" # daily 5AM

env:
  # not needed for audit
  PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'

permissions:
  contents: read # to fetch code (actions/checkout)

jobs:
  Audit:
    # prevents this action from running on forks
    if: github.repository == 'sveltejs/kit'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      - uses: ./.github/actions/node-setup
      # check prod dependencies as these would affect users
      - run: pnpm audit --prod

The same workflow, on Latchkey

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

name: audit
 
on:
  schedule:
    - cron: "0 5 * * *" # daily 5AM
 
env:
  # not needed for audit
  PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
 
permissions:
  contents: read # to fetch code (actions/checkout)
 
jobs:
  Audit:
    timeout-minutes: 30
    # prevents this action from running on forks
    if: github.repository == 'sveltejs/kit'
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      - uses: ./.github/actions/node-setup
      # check prod dependencies as these would affect users
      - run: pnpm audit --prod
 

What changed

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