For Bitbucket Cloud

Coverage inside the Bitbucket pull request.

A Code Insights report on every commit, the untested lines marked right in the pull request's diff, and a check that can hold the merge. Set up with one pipe and no secret.

In the diff

Untested lines, marked where they were written

Each run of changed lines no test executes gets an annotation in the pull request's diff. A changed source file with no coverage data at all gets a marker on the file itself; a changed README, config file or test does not, because it isn't untested code.

Inline annotations
src/billing/invoice.ts+7 -1

In the Reports panel

A Code Insights report on every commit

Total coverage, the change against the base, diff coverage, the number of untested changed lines, the gate's verdict and the worst-covered changed files — on the commit, and in the pull request's Reports panel.

Coverage in pull requests
gocov coverage Passed

110 of 120 changed lines are covered by tests.

Total coverage
84.2%
Change vs base
+0.6%
Diff coverage
91.7%
Uncovered changed lines
10
Statements
8420 / 10000
Gate
passed
src/billing/invoice.ts
82.5%
src/billing/refund.ts
85.0%

At the merge

A merge check that holds the line

Every upload posts a gocov build status. Require it in the repository's merge checks, and a pull request that misses your coverage gate can't be merged until its tests catch up. The pull request also gets a comment with the full list of untested lines, updated in place on every push.

Make the gate block merges
Pull request checks: tests pass, gocov's coverage gate fails, and the merge is blocked
test Successful in 2m
gocov coverage: 81.9% (-2.3%) — diff coverage 52.4% is below the minimum 80%
Merging is blocked. A required check has failed.

Setup

One pipe, no secret

  1. Sign in with Bitbucket and pick your workspace.
  2. Click Grant write access once. Bitbucket has no app identity, so gocov posts as the account that granted it: use a bot account if your team has one.
  3. Add the pipe after your tests. Naming gocov in the step's OIDC audiences lets the step prove which repository it is, so there's no token to store.
Connect your forge
# bitbucket-pipelines.yml
- step:
    oidc:
      audiences:
        - https://app.gocov.dev
    script:
      - npm ci && npm test -- --coverage
      - pipe: docker://gocov/upload-pipe:0
        variables:
          FILES: coverage/lcov.info

Why it matters

Bitbucket Cloud has no coverage view of its own.

Atlassian's public request for coverage in pull request diffs, BCLOUD-22379, has been open since January 2023 and is still gathering interest. gocov fills that gap today.

BCLOUD-22379 · public issue tracker Code coverage in pull request diffs Gathering interest · opened January 2023 · checked December 2026

Put coverage in your next Bitbucket pull request.

Moving from Codecov or Coveralls? The migration guide maps your settings over and keeps the old tool running until the numbers agree.