Skip to content
Latchkey

CI workflow (gosling-lang/gos)

The CI workflow from gosling-lang/gos, 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: gosling-lang/gos.github/workflows/ci.ymlLicense MITView source

What it does

This is the CI workflow from the gosling-lang/gos 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: CI

on:
  push:
    branches:
      - main
  pull_request:
  workflow_dispatch:

concurrency:
  group: test-${{ github.head_ref }}
  cancel-in-progress: true

env:
  PYTHONUNBUFFERED: "1"
  FORCE_COLOR: "1"
  SKIP_DENO_BUILD: "1"

jobs:

  Test:
    name: Python ${{ matrix.python-version }} / ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        python-version: ["3.9", "3.10", "3.11", "3.12"]
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/setup-uv@v5
      - run: |
          uv run pytest --ignore gosling/examples --ignore tools/altair --doctest-modules gosling
        env:
          UV_PYTHON: ${{ matrix.python-version }}

The same workflow, on Latchkey

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

name: CI
 
on:
  push:
    branches:
      - main
  pull_request:
  workflow_dispatch:
 
concurrency:
  group: test-${{ github.head_ref }}
  cancel-in-progress: true
 
env:
  PYTHONUNBUFFERED: "1"
  FORCE_COLOR: "1"
  SKIP_DENO_BUILD: "1"
 
jobs:
 
  Test:
    timeout-minutes: 30
    name: Python ${{ matrix.python-version }} / ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        python-version: ["3.9", "3.10", "3.11", "3.12"]
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/setup-uv@v5
      - run: |
          uv run pytest --ignore gosling/examples --ignore tools/altair --doctest-modules gosling
        env:
          UV_PYTHON: ${{ matrix.python-version }}
 

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