Skip to content

Coverage: upload with codecov-action (org tokens work); opt-in covr report without Codecov - #37

Merged
lwaldron merged 3 commits into
mainfrom
codecov-action-upload
Oct 31, 2026
Merged

lwaldron merged 3 commits into
mainfrom
codecov-action-upload

Conversation

@lwaldron

Copy link
Copy Markdown
Collaborator

Two changes to test coverage in bioccheck.yml, one commit each so either can be reverted alone.

1. Upload coverage with codecov/codecov-action so organization tokens work (ADR 0011, Proposed)

covr::codecov() uploads to Codecov's legacy endpoint, which rejects an organization's global upload token ("Could not find a repository associated with upload token"). An organization that stores CODECOV_TOKEN once as an organization secret therefore gets no coverage, and because upload errors don't fail the step, runs still look green.

  • covr still computes coverage; covr::to_cobertura() writes coverage.xml, and codecov/codecov-action@v7 uploads it. Repository tokens keep working.
  • The action verifies its uploader with gpg, which the Bioconductor container lacks, so gnupg is installed when missing, only in runs that upload.
  • Coverage steps use continue-on-error, so coverage never fails the package check (as before), and the uploader's telemetry is off.

2. New opt-in input enable_coverage_report (ADR 0012, Proposed)

Computes coverage with covr without Codecov: the covr::report() HTML is saved as the coverage-report artifact, and total and per-file percentages go to the run summary. No account or token, so it also works on fork PRs. Coverage is computed once when both options are on. The default path is unchanged: no coverage steps, no coverage packages installed.

Docs: Test Coverage section in bioccheck_usage.md, inputs table, and a generator checkbox.

Testing

Run locally with act in bioconductor/bioconductor_docker:devel (linux/amd64) on a minimal package:

  • default inputs: passes, no coverage steps;
  • report + Codecov with an organization global upload token: passes; summary written, upload accepted and visible on Codecov;
  • report only: passes.

covr::codecov() was also re-tested with the same global token and still fails with the 404, which is why the upload method changes. Not testable with act: actions/upload-artifact@v7 (its artifact server doesn't support v7); I'll confirm the artifact on GitHub runners before merging. Reviewed by a Gemini review agent; its fixes are included.

Drafted with Claude Code.

lwaldron and others added 3 commits October 31, 2026 01:20
covr::codecov() uses Codecov's legacy endpoint, which rejects global upload
tokens, so an organization-level CODECOV_TOKEN silently uploaded nothing.
Write a Cobertura report with covr and upload it with codecov/codecov-action,
installing gpg (missing from the Bioconductor container) for the uploader's
signature check. Coverage steps never fail the check, and the uploader's
telemetry is off. ADR 0011 (Proposed).

Co-authored-by: Claude Code <noreply@anthropic.com>
Opt-in input that computes coverage with covr, saves the covr::report() HTML
as the coverage-report artifact, and writes per-file percentages to the run
summary. Needs no token, so it also works on fork pull requests. Coverage is
computed once when both this and the Codecov upload are on. ADR 0012 (Proposed).

Co-authored-by: Claude Code <noreply@anthropic.com>
@lwaldron
lwaldron force-pushed the codecov-action-upload branch from 7cfa4ea to f543f29 Compare October 31, 2026 05:20
@lwaldron
lwaldron merged commit dd92d92 into main Oct 31, 2026
2 checks passed
@lwaldron
lwaldron deleted the codecov-action-upload branch October 31, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant