Skip to content
Latchkey

Freqtrade TUI CI workflow (freqtrade/ftui)

The Freqtrade TUI CI workflow from freqtrade/ftui, explained and optimized by Latchkey.

C

CI health: C - fair

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

Grade your own workflow free or run it on Latchkey →
Source: freqtrade/ftui.github/workflows/ci.ymlLicense MITView source

What it does

This is the Freqtrade TUI CI workflow from the freqtrade/ftui 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: Freqtrade TUI CI

on:
  push:
    branches:
      - main
      - ci/*
  release:
    types: [published]
  pull_request:

concurrency:
  group: "${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}"
  cancel-in-progress: true
permissions:
  repository-projects: read



jobs:
  build:

    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ "ubuntu-22.04", "ubuntu-24.04", "macos-14", "macos-15", "windows-latest" ]
        python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

    steps:
    - uses: actions/checkout@v4

    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install .
        pip install ruff

    - name: Test execution (for now with `--help`)
      run: |
        ftui --help

    - name: Run Ruff
      run: |
        ruff check --output-format=github

    # - name: Run Ruff format check
    #   run: |
    #     ruff format --check

  publish:
    name: "Deploy to pypi"
    if: (github.event_name == 'release')
    environment:
      name: release
      url: https://pypi.org/p/ftui

    permissions:
      id-token: write

    needs: build
    runs-on: ubuntu-22.04

    steps:
    - uses: actions/checkout@v4

    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        python-version: "3.12"


    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install build


    - name: Build package
      run: |
        pip install -U build
        python -m build

    - name: Publish to PyPI (Test)
      uses: pypa/gh-action-pypi-publish@v1.13.0
      with:
        repository-url: https://test.pypi.org/legacy/
        skip-existing: true
        attestations: false # https://github.com/pypa/gh-action-pypi-publish/issues/283#issuecomment-2499296440

    - name: Publish to PyPI
      uses: pypa/gh-action-pypi-publish@v1.13.0

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: Freqtrade TUI CI
 
on:
  push:
    branches:
      - main
      - ci/*
  release:
    types: [published]
  pull_request:
 
concurrency:
  group: "${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}"
  cancel-in-progress: true
permissions:
  repository-projects: read
 
 
 
jobs:
  build:
    timeout-minutes: 30
 
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ "ubuntu-22.04", "ubuntu-24.04", "macos-14", "macos-15", "windows-latest" ]
        python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
 
    steps:
    - uses: actions/checkout@v4
 
    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        cache: 'pip'
        python-version: ${{ matrix.python-version }}
 
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install .
        pip install ruff
 
    - name: Test execution (for now with `--help`)
      run: |
        ftui --help
 
    - name: Run Ruff
      run: |
        ruff check --output-format=github
 
    # - name: Run Ruff format check
    #   run: |
    #     ruff format --check
 
  publish:
    timeout-minutes: 30
    name: "Deploy to pypi"
    if: (github.event_name == 'release')
    environment:
      name: release
      url: https://pypi.org/p/ftui
 
    permissions:
      id-token: write
 
    needs: build
    runs-on: latchkey-small
 
    steps:
    - uses: actions/checkout@v4
 
    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        cache: 'pip'
        python-version: "3.12"
 
 
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install build
 
 
    - name: Build package
      run: |
        pip install -U build
        python -m build
 
    - name: Publish to PyPI (Test)
      uses: pypa/gh-action-pypi-publish@v1.13.0
      with:
        repository-url: https://test.pypi.org/legacy/
        skip-existing: true
        attestations: false # https://github.com/pypa/gh-action-pypi-publish/issues/283#issuecomment-2499296440
 
    - name: Publish to PyPI
      uses: pypa/gh-action-pypi-publish@v1.13.0
 

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.

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 2 jobs (26 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