Skip to content
Latchkey

Daily pip install check workflow (cltk/cltk)

The Daily pip install check workflow from cltk/cltk, explained and optimized by Latchkey.

A

CI health: A - excellent

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: cltk/cltk.github/workflows/pip-install-check.ymlLicense MITView source

What it does

This is the Daily pip install check workflow from the cltk/cltk 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: Daily pip install check

on:
  schedule:
    # Daily at 08:00 UTC
    - cron: "0 8 * * *"
  # Allow manual runs
  workflow_dispatch:

# Restrict default GITHUB_TOKEN permissions (principle of least privilege)
permissions:
  contents: read

jobs:
  pypi-install:
    name: Install from PyPI (${{ matrix.os }}, py${{ matrix.python-version }})
    runs-on: ${{ matrix.os }}
    timeout-minutes: 15
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: ["3.14"]
    steps:
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}

      - name: Upgrade pip
        run: python -m pip install --upgrade pip

      - name: Install CLTK from PyPI
        run: python -m pip install cltk

      - name: Verify import and print version
        run: python -c "import cltk, sys; print('CLTK import OK:', cltk.__version__)"

      - name: Check installed dependencies
        run: python -m pip check

  pypi-install-extras:
    name: Install PyPI with extra [${{ matrix.extra }}] (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    timeout-minutes: 20
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        extra: [openai, stanza, ollama, mistral]
    steps:
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.14"

      - name: Upgrade pip
        run: python -m pip install --upgrade pip

      - name: Install CLTK with extra
        run: python -m pip install "cltk[${{ matrix.extra }}]"

      - name: Verify import
        run: python -c "import cltk; print('CLTK import with extra OK')"

      - name: Check installed dependencies
        run: python -m pip check

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: Daily pip install check
 
on:
  schedule:
    # Daily at 08:00 UTC
    - cron: "0 8 * * *"
  # Allow manual runs
  workflow_dispatch:
 
# Restrict default GITHUB_TOKEN permissions (principle of least privilege)
permissions:
  contents: read
 
jobs:
  pypi-install:
    name: Install from PyPI (${{ matrix.os }}, py${{ matrix.python-version }})
    runs-on: ${{ matrix.os }}
    timeout-minutes: 15
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: ["3.14"]
    steps:
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          cache: 'pip'
          python-version: ${{ matrix.python-version }}
 
      - name: Upgrade pip
        run: python -m pip install --upgrade pip
 
      - name: Install CLTK from PyPI
        run: python -m pip install cltk
 
      - name: Verify import and print version
        run: python -c "import cltk, sys; print('CLTK import OK:', cltk.__version__)"
 
      - name: Check installed dependencies
        run: python -m pip check
 
  pypi-install-extras:
    name: Install PyPI with extra [${{ matrix.extra }}] (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    timeout-minutes: 20
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        extra: [openai, stanza, ollama, mistral]
    steps:
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          cache: 'pip'
          python-version: "3.14"
 
      - name: Upgrade pip
        run: python -m pip install --upgrade pip
 
      - name: Install CLTK with extra
        run: python -m pip install "cltk[${{ matrix.extra }}]"
 
      - name: Verify import
        run: python -c "import cltk; print('CLTK import with extra OK')"
 
      - name: Check installed dependencies
        run: python -m pip check
 

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 2 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