Skip to content
Latchkey

Autobahn workflow (nodejs/undici)

The Autobahn workflow from nodejs/undici, explained and optimized by Latchkey.

D

CI health: D - needs work

Point runs-on at Latchkey and get caching, run de-duplication, 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: nodejs/undici.github/workflows/autobahn.ymlLicense MITView source

What it does

This is the Autobahn workflow from the nodejs/undici 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: Autobahn

on:
  workflow_dispatch:
  workflow_call:
    inputs:
      node-version:
        default: '24'
        type: string
  pull_request:
    paths:
      - '.github/workflows/autobahn.yml'
      - 'lib/web/websocket/**'
      - 'test/autobahn/**'

permissions:
  contents: read

jobs:
  autobahn:
    name: Autobahn Test Suite
    runs-on: ubuntu-latest
    container: node:24
    services:
      fuzzingserver:
        image: crossbario/autobahn-testsuite:latest
        ports:
          - '9001:9001'
        options: --name fuzzingserver
        volumes:
          - ${{ github.workspace }}/test/autobahn/config:/config
          - ${{ github.workspace }}/test/autobahn/reports:/reports
    steps:
      - name: Checkout Repository
        uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false
          clean: false
      
      - name: Restart Autobahn Server
        # Restart service after volumes have been checked out
        uses: docker://docker
        with:
          args: docker restart --time 0 --signal=SIGKILL fuzzingserver

      - name: Setup Node.js@${{ inputs.node-version }}
        uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          node-version: ${{ inputs.node-version }}

      - name: Run Autobahn Test Suite
        run: npm run test:websocket:autobahn
        env:
          FUZZING_SERVER_URL: ws://fuzzingserver:9001
          LOG_ON_ERROR: false

      - name: Report CI
        id: report-ci
        run: npm run test:websocket:autobahn:report
        env:
          FAIL_ON_ERROR: true

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.

name: Autobahn
 
on:
  workflow_dispatch:
  workflow_call:
    inputs:
      node-version:
        default: '24'
        type: string
  pull_request:
    paths:
      - '.github/workflows/autobahn.yml'
      - 'lib/web/websocket/**'
      - 'test/autobahn/**'
 
permissions:
  contents: read
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  autobahn:
    timeout-minutes: 30
    name: Autobahn Test Suite
    runs-on: latchkey-small
    container: node:24
    services:
      fuzzingserver:
        image: crossbario/autobahn-testsuite:latest
        ports:
          - '9001:9001'
        options: --name fuzzingserver
        volumes:
          - ${{ github.workspace }}/test/autobahn/config:/config
          - ${{ github.workspace }}/test/autobahn/reports:/reports
    steps:
      - name: Checkout Repository
        uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false
          clean: false
      
      - name: Restart Autobahn Server
        # Restart service after volumes have been checked out
        uses: docker://docker
        with:
          args: docker restart --time 0 --signal=SIGKILL fuzzingserver
 
      - name: Setup Node.js@${{ inputs.node-version }}
        uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          cache: 'npm'
          node-version: ${{ inputs.node-version }}
 
      - name: Run Autobahn Test Suite
        run: npm run test:websocket:autobahn
        env:
          FUZZING_SERVER_URL: ws://fuzzingserver:9001
          LOG_ON_ERROR: false
 
      - name: Report CI
        id: report-ci
        run: npm run test:websocket:autobahn:report
        env:
          FAIL_ON_ERROR: true
 

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