pysen-test workflow (pfnet/pysen)
The pysen-test workflow from pfnet/pysen, explained and optimized by Latchkey.
A
CI health: A - excellent
Point runs-on at Latchkey and get run de-duplication, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the pysen-test workflow from the pfnet/pysen 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: pysen-test
on:
push:
branches:
- main
pull_request: {}
jobs:
tox_post_310:
name: Run pysen-test
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
with:
lfs: false
path: ${{ env.CHECKOUT_PATH }}
- name: Run test
uses: ./.github/actions/pysen-test/
tox_post_313:
name: Run pysen-test-post-313
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
with:
lfs: false
path: ${{ env.CHECKOUT_PATH }}
- name: Run test
uses: ./.github/actions/pysen-test-post-313/
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: pysen-test on: push: branches: - main pull_request: {} concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: tox_post_310: name: Run pysen-test runs-on: latchkey-small timeout-minutes: 15 steps: - uses: actions/checkout@v5 with: lfs: false path: ${{ env.CHECKOUT_PATH }} - name: Run test uses: ./.github/actions/pysen-test/ tox_post_313: name: Run pysen-test-post-313 runs-on: latchkey-small timeout-minutes: 15 steps: - uses: actions/checkout@v5 with: lfs: false path: ${{ env.CHECKOUT_PATH }} - name: Run test uses: ./.github/actions/pysen-test-post-313/
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Cancel superseded runs when a branch or PR gets a newer push.
This workflow runs 2 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.