Skip to content
Latchkey

Launch test workflow (JuliaPluto/Pluto.jl)

The Launch test workflow from JuliaPluto/Pluto.jl, 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: JuliaPluto/Pluto.jl.github/workflows/LaunchTest.ymlLicense MITView source

What it does

This is the Launch test workflow from the JuliaPluto/Pluto.jl 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: Launch test

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on: workflow_dispatch

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
    test:
        runs-on: ${{ matrix.os }}
        # Uncomment if you want to see all results for all OSses. Otherwise, the first failed test cancels all others
        # continue-on-error: true
        strategy:
            matrix:
                # We test quite a lot of versions because we do some OS and version specific things unfortunately
                julia-version: ["lts", "1"]
                os: [windows-latest, ubuntu-latest]

        steps:
            # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
            - uses: actions/checkout@v7

            # Makes thes `julia` command available
            - uses: julia-actions/setup-julia@v3
              with:
                  version: ${{ matrix.julia-version }}

            # 🚗
            - name: Test launch Pluto
              run: |
                  echo "hello world"
                  julia ${{ github.workspace }}/test/run_notebook.jl ${{ github.workspace }}

The same workflow, on Latchkey

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

name: Launch test
 
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on: workflow_dispatch
 
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
    test:
        timeout-minutes: 30
        runs-on: ${{ matrix.os }}
        # Uncomment if you want to see all results for all OSses. Otherwise, the first failed test cancels all others
        # continue-on-error: true
        strategy:
            matrix:
                # We test quite a lot of versions because we do some OS and version specific things unfortunately
                julia-version: ["lts", "1"]
                os: [windows-latest, ubuntu-latest]
 
        steps:
            # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
            - uses: actions/checkout@v7
 
            # Makes thes `julia` command available
            - uses: julia-actions/setup-julia@v3
              with:
                  version: ${{ matrix.julia-version }}
 
            # 🚗
            - name: Test launch Pluto
              run: |
                  echo "hello world"
                  julia ${{ github.workspace }}/test/run_notebook.jl ${{ github.workspace }}
 

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.

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