Skip to content
Latchkey

test-latest-stable-release workflow (yurijmikhalevich/rclip)

The test-latest-stable-release workflow from yurijmikhalevich/rclip, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get caching, 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: yurijmikhalevich/rclip.github/workflows/test-latest-stable-release.yamlLicense MITView source

What it does

This is the test-latest-stable-release workflow from the yurijmikhalevich/rclip 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: test-latest-stable-release

on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *'

jobs:
  get_last_release_tag:
    runs-on: ubuntu-22.04
    outputs:
      tag: ${{ steps.extract_tag.outputs.tag }}
    steps:
      - id: extract_tag
        run: |
          TAG=$(curl -s https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest | jq -r '.tag_name')
          echo "tag=$TAG" >> $GITHUB_OUTPUT
          echo "Last release tag: $TAG"

  pypi:
    needs: get_last_release_tag
    strategy:
      matrix:
        python: ['3.11', '3.12', '3.13']
        os: [ubuntu-22.04, macos-14, windows-2022]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python }}
      - run: pip install --extra-index-url https://download.pytorch.org/whl/cpu --upgrade rclip
        if: startsWith(matrix.os, 'ubuntu-')
      - run: pip install --upgrade rclip
        if: ${{ !startsWith(matrix.os, 'ubuntu-') }}
      - uses: ./.github/actions/test-system-rclip
        with:
          python: ${{ matrix.python }}
          force-bash: true

  brew:
    needs: get_last_release_tag
    strategy:
      matrix:
        # FIXME: the test fails on linuxbrew because it rclip from linuxbrew
        # produces a slightly different output; maybe, because we built pytorch
        # slightly differently for linuxbrew
        # os: [ubuntu-22.04, macos-15]
        os: [macos-15]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - name: Install Linuxbrew (only on Ubuntu)
        if: startsWith(matrix.os, 'ubuntu-')
        run: |
          /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
          echo >> /home/runner/.bashrc
          echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/runner/.bashrc
      - run: brew update && brew upgrade
      - run: brew install yurijmikhalevich/tap/rclip
        # overriding shell to ensure it reads `.bashrc`
        shell: bash -ieo pipefail {0}
      - uses: ./.github/actions/test-system-rclip

  appimage:
    needs: get_last_release_tag
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - run: sudo apt-get install -y fuse
      - name: Download & install rclip AppImage
        run: |
          url=$(curl -s "https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest" \
            | jq -r '.assets[] | select(.name | endswith(".AppImage")).browser_download_url')
          wget -O rclip.AppImage "$url"
          chmod +x rclip.AppImage
          sudo mv rclip.AppImage /usr/local/bin/rclip
      - uses: ./.github/actions/test-system-rclip

  snap:
    needs: get_last_release_tag
    strategy:
      matrix:
        os: [ubuntu-22.04, ubuntu-22.04-arm]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - run: sudo snap install rclip
      - uses: ./.github/actions/test-system-rclip

  windows:
    needs: get_last_release_tag
    runs-on: windows-2022
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - name: Download & install rclip MSI
        run: |
          $url = Invoke-RestMethod -Uri "https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest"
          $asset = $url.assets | Where-Object { $_.name -like "*.msi" } | Select-Object -First 1
          Invoke-WebRequest -Uri $asset.browser_download_url -OutFile "rclip.msi"
          Start-Process msiexec.exe -Wait -ArgumentList "/i rclip.msi /quiet"
      - uses: ./.github/actions/test-system-rclip

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: test-latest-stable-release
 
on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *'
 
jobs:
  get_last_release_tag:
    timeout-minutes: 30
    runs-on: latchkey-small
    outputs:
      tag: ${{ steps.extract_tag.outputs.tag }}
    steps:
      - id: extract_tag
        run: |
          TAG=$(curl -s https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest | jq -r '.tag_name')
          echo "tag=$TAG" >> $GITHUB_OUTPUT
          echo "Last release tag: $TAG"
 
  pypi:
    timeout-minutes: 30
    needs: get_last_release_tag
    strategy:
      matrix:
        python: ['3.11', '3.12', '3.13']
        os: [ubuntu-22.04, macos-14, windows-2022]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - uses: actions/setup-python@v6
        with:
          cache: 'pip'
          python-version: ${{ matrix.python }}
      - run: pip install --extra-index-url https://download.pytorch.org/whl/cpu --upgrade rclip
        if: startsWith(matrix.os, 'ubuntu-')
      - run: pip install --upgrade rclip
        if: ${{ !startsWith(matrix.os, 'ubuntu-') }}
      - uses: ./.github/actions/test-system-rclip
        with:
          python: ${{ matrix.python }}
          force-bash: true
 
  brew:
    timeout-minutes: 30
    needs: get_last_release_tag
    strategy:
      matrix:
        # FIXME: the test fails on linuxbrew because it rclip from linuxbrew
        # produces a slightly different output; maybe, because we built pytorch
        # slightly differently for linuxbrew
        # os: [ubuntu-22.04, macos-15]
        os: [macos-15]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - name: Install Linuxbrew (only on Ubuntu)
        if: startsWith(matrix.os, 'ubuntu-')
        run: |
          /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
          echo >> /home/runner/.bashrc
          echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/runner/.bashrc
      - run: brew update && brew upgrade
      - run: brew install yurijmikhalevich/tap/rclip
        # overriding shell to ensure it reads `.bashrc`
        shell: bash -ieo pipefail {0}
      - uses: ./.github/actions/test-system-rclip
 
  appimage:
    timeout-minutes: 30
    needs: get_last_release_tag
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - run: sudo apt-get install -y fuse
      - name: Download & install rclip AppImage
        run: |
          url=$(curl -s "https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest" \
            | jq -r '.assets[] | select(.name | endswith(".AppImage")).browser_download_url')
          wget -O rclip.AppImage "$url"
          chmod +x rclip.AppImage
          sudo mv rclip.AppImage /usr/local/bin/rclip
      - uses: ./.github/actions/test-system-rclip
 
  snap:
    timeout-minutes: 30
    needs: get_last_release_tag
    strategy:
      matrix:
        os: [ubuntu-22.04, ubuntu-22.04-arm]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - run: sudo snap install rclip
      - uses: ./.github/actions/test-system-rclip
 
  windows:
    timeout-minutes: 30
    needs: get_last_release_tag
    runs-on: windows-2022
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ needs.get_last_release_tag.outputs.tag }}
      - name: Download & install rclip MSI
        run: |
          $url = Invoke-RestMethod -Uri "https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest"
          $asset = $url.assets | Where-Object { $_.name -like "*.msi" } | Select-Object -First 1
          Invoke-WebRequest -Uri $asset.browser_download_url -OutFile "rclip.msi"
          Start-Process msiexec.exe -Wait -ArgumentList "/i rclip.msi /quiet"
      - uses: ./.github/actions/test-system-rclip
 

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 6 jobs (15 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