Skip to content
Latchkey

interop-tests workflow (webrtc/samples)

The interop-tests workflow from webrtc/samples, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get caching, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: webrtc/samples.github/workflows/interop-tests.ymlLicense BSD-3-ClauseView source

What it does

This is the interop-tests workflow from the webrtc/samples repository, a real project running GitHub Actions. It is shown here with attribution under its BSD-3-Clause license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
on:
  schedule:
    - cron: "30 5 * * *"


jobs:
  interop:
    runs-on: ubuntu-22.04

    timeout-minutes: 5

    strategy:
      fail-fast: false

      matrix:
        browserA: [chrome, firefox]

        browserB: [firefox, chrome]

        bver: [unstable]

    steps:
    - uses: actions/checkout@v4

    - uses: actions/setup-node@v4

    - run: npm install

    - run: sudo rm /usr/bin/chromedriver /usr/bin/geckodriver # remove preinstalled github chromedriver/geckodriver from $PATH

    - run: Xvfb :99 &

    - run: BROWSER_A=${{matrix.browserA}} BROWSER_B=${{matrix.browserB}} BVER=${{matrix.bver}} DISPLAY=:99.0 node test/download-browsers.js

    - run: BROWSER_A=${{matrix.browserA}} BROWSER_B=${{matrix.browserB}} BVER=${{matrix.bver}} DISPLAY=:99.0 node_modules/.bin/jest --retries=3 test/interop/

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.

on:

  schedule:

    - cron: "30 5 * * *"



jobs:

  interop:

    runs-on: latchkey-small

    timeout-minutes: 5

    strategy:

      fail-fast: false

      matrix:

        browserA: [chrome, firefox]

        browserB: [firefox, chrome]

        bver: [unstable]

    steps:

    - uses: actions/checkout@v4

    - uses: actions/setup-node@v4

      with:

        cache: 'npm'

    - run: npm install

    - run: sudo rm /usr/bin/chromedriver /usr/bin/geckodriver # remove preinstalled github chromedriver/geckodriver from $PATH

    - run: Xvfb :99 &

    - run: BROWSER_A=${{matrix.browserA}} BROWSER_B=${{matrix.browserB}} BVER=${{matrix.bver}} DISPLAY=:99.0 node test/download-browsers.js

    - run: BROWSER_A=${{matrix.browserA}} BROWSER_B=${{matrix.browserB}} BVER=${{matrix.bver}} DISPLAY=:99.0 node_modules/.bin/jest --retries=3 test/interop/

 

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 (4 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