Skip to content
Latchkey

Codecov Report Upload workflow (mirumee/ariadne)

The Codecov Report Upload workflow from mirumee/ariadne, explained and optimized by Latchkey.

F

CI health: F - at risk

Point runs-on at Latchkey and get caching, run de-duplication, 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: mirumee/ariadne.github/workflows/codecov.ymlLicense BSD-3-ClauseView source

What it does

This is the Codecov Report Upload workflow from the mirumee/ariadne repository, a real project running GitHub Actions. It is shown here with attribution under its BSD-3-Clause license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Codecov Report Upload

on:
  push:
    branches:
      - main
  pull_request:

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

jobs:
  cov-report:
    name: Generate and publish coverage report
    runs-on: ubuntu-latest
    steps:
      - name: Checkout source code
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version-file: pyproject.toml

      - name: Install Just
        uses: taiki-e/install-action@just

      - name: Install Hatch
        uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc

      - name: Run coverage
        run: just coverage

      - name: Publish coverage report to Codecov
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: coverage.xml

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: Codecov Report Upload
 
on:
  push:
    branches:
      - main
  pull_request:
 
env:
  PYTHONUNBUFFERED: "1"
  FORCE_COLOR: "1"
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  cov-report:
    timeout-minutes: 30
    name: Generate and publish coverage report
    runs-on: latchkey-small
    steps:
      - name: Checkout source code
        uses: actions/checkout@v4
 
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          cache: 'pip'
          python-version-file: pyproject.toml
 
      - name: Install Just
        uses: taiki-e/install-action@just
 
      - name: Install Hatch
        uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
 
      - name: Run coverage
        run: just coverage
 
      - name: Publish coverage report to Codecov
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: coverage.xml
 

What changed

2 third-party actions are referenced by a movable tag. Pin them to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow