Skip to content

[ENHANCEMENT] Update CI to use sliced coverage and add merged-report guard #118

Description

@edelauna

Problem (one or two sentences)

CI currently runs pnpm test:coverage (a single monolithic task); after slicing, it must run test:coverage:merge to trigger all slices and produce the merged report, and needs a guard to prevent silently uploading an empty or missing report to Codecov.

Context (who is affected and when)

The Codecov upload step in .github/workflows/code-qa.yml:74 expects src/coverage/lcov.info. This path is produced by the merge task added in #117. The upload step itself does not need to change — only the step that generates the file. This is the final step in the coverage-slicing work tracked in #47 and depends on #117.

Desired behavior (conceptual, not technical)

CI runs pnpm turbo run test:coverage:merge --filter=zoo-code instead of pnpm test:coverage. A post-step validates the merged report is present and non-empty before upload. On a commit touching only src/api/, CI logs show cache hits for the four unaffected slices.

Constraints / preferences (optional)

  • The Codecov upload path (src/coverage/lcov.info) must not change.
  • Baseline to beat: ~8m24s for the full coverage step on an Ubuntu runner (from CI run 25606102845).
  • Record new CI runtime and cache-hit rates in the PR notes as evidence.

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear context and impact

Acceptance criteria (optional)

  • CI passes end-to-end.
  • A commit touching only src/api/ shows cache hits for test:coverage:core, test:coverage:services, test:coverage:misc, and test:coverage:dist.
  • lcov --summary src/coverage/lcov.info exits 0 and reports non-zero covered lines.

Proposed approach (optional)

  1. Replace run: pnpm test:coverage with run: pnpm turbo run test:coverage:merge --filter=zoo-code in code-qa.yml.
  2. Add a step: run: lcov --summary src/coverage/lcov.info (exits non-zero if file is missing or has 0 covered lines).
  3. Verify the Codecov upload step is unchanged.

Trade-offs / risks (optional)

  • lcov may not be pre-installed on the GitHub Actions Ubuntu runner; add an install step if needed.
  • The first CI run after merging will be a full cache miss; subsequent runs will show partial hits.

Parent issue: #47
Depends on: #117

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions