Skip to content

fix: kcov not available on ubuntu-24.04 (ubuntu-latest) — coverage job breaks when bats tests exist #867

Description

@don-petry

Problem

The org-standard ci.yml template's coverage job installs kcov via sudo apt-get install -y -qq bats kcov. Since ubuntu-latest on GitHub Actions now resolves to Ubuntu 24.04, and kcov was dropped from Ubuntu 24.04's package repositories, the job fails with:

E: Unable to locate package kcov
Process completed with exit code 100.

This only manifests once a repo has .bats test files — the green-until-tests early-exit in the script no longer fires.

Affected repos

Any repo that:

  1. Has tests/**/*.bats files
  2. Uses runs-on: ubuntu-latest in the coverage job (i.e., every repo tracking the standard template)

petry-projects/repo-template is currently broken (PR #82 CI failing). Patched there with a temporary runs-on: ubuntu-22.04 workaround pending this upstream fix.

Suggested fix

Options (in order of preference):

  1. Pin coverage job to ubuntu-22.04 (minimal change; 22.04 is supported until April 2027)
  2. Download a pre-built kcov binary from GitHub Releases or build from source in CI
  3. Install bats via npm (bats-core) and drop kcov instrumentation, running bats directly — the job remains a pass/fail gate without coverage percentages

The template in standards/workflows/ci.yml needs updating, and the fix should be synced fleet-wide via the standards-deploy workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug reportsciCI/CD pipeline issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions