Vetrix Docs

How to surface pipeline coverage

Vetrix shows a Coverage Report on the pipeline detail page. To populate it, your pipeline just needs to produce a coverage summary under a well-known filename — there is no per-job artifact wiring to set up.

Emit coverage-summary.json

Add a step to any job that writes a coverage-summary.json file at the job's workspace root. Use whatever tool fits your stack — the only requirement is the filename and the documented schema.

coverage:
  stage: test
  image: golang:1.25
  commands:
    - go test -count=1 -covermode=atomic -coverprofile=coverage.out ./...
    - python3 scripts/coverage-summary.py coverage.out coverage-summary.json

That's it. coverage-summary.json is a well-known coverage artifact (the same way vetrix-ci.yml is the well-known pipeline config file): the runner auto-collects it. You do not have to list it under artifacts.paths. (Listing it there still works and won't create a duplicate.)

For a non-Go project, point your coverage tool — or a small conversion script — at the same output name: write a coverage-summary.json at the workspace root.

What you'll see

On the next run, open the pipeline detail page. The Coverage Report shows the total coverage percentage and a sortable per-package table. A pipeline whose jobs emit no coverage file simply shows an empty state — no error.

If the report stays empty when you expected data, check that:

  • the file is named exactly coverage-summary.json (at the workspace root), and
  • its contents match the schema (a malformed file is skipped, not shown).

Schema

The summary is a small JSON document — schema_version, total_pct, and a packages[] array. The full field-by-field contract, the producing-step example, validation rules, and the consumer API route are documented in the authoritative contract:

See also the Pipeline YAML Reference for how artifacts work in general.