{% extends "base.html" %} {% import "repo_tabs.html" as m %} {% block title %}Coverage · {{ repo.owner }}/{{ repo.name }}{% endblock %} {% block tabs %}{% call m::tabs(repo, "coverage") %}{% endblock %} {% block content %} {% if let Some(r) = report %}

Coverage

{% if bookmarks.len() > 1 %}
{% else %}on {{ bookmark }}{% endif %} · run #{{ r.run_number }} ·
{{ self.pct(r.percent()) }}
{% if let Some(d) = delta %}
{{ self.signed(d) }} since the run before
{% else %}
the first report here
{% endif %}
{% if runs > 1 %}
{{ coverage_chart|safe }}
{% endif %}
Lines covered{{ r.lines_hit }} of {{ r.lines_found }}
Hits per line{{ self.hits(r) }}
{% if r.functions_found > 0 %}
Functions{{ self.pct(r.functions_percent()) }} {{ r.functions_hit }} of {{ r.functions_found }}
{% endif %} {% if r.branches_found > 0 %}
Branches{{ self.pct(r.branches_percent()) }} {{ r.branches_hit }} of {{ r.branches_found }}
{% endif %}
Files{{ r.files }}
{% if let Some(t) = first_ms %}
Reporting since
{% endif %}
Badgecoverage {{ self.pct(r.percent()) }}

This run

{% if !moved.is_empty() %}

Coverage moved in

{% for f in moved %}{% endfor %}
{{ f.path }}{{ self.pct_of(f.before) }} → {{ self.pct_of(f.after) }}{{ self.signed(&f.delta) }}
{% endif %}

Files by coverage

{% for b in bands %}
{{ b.label }}{{ b.files }}
{% endfor %}
{% if runs > 1 %}

Relevant lines covered covered missed

{{ lines_chart|safe }}
{% endif %} {% if recent.len() > 1 %}

Recent runs on {{ bookmark }}

{% for x in recent %} {% endfor %}
RunJobCoverageChangeLinesWhen
#{{ x.report.run_number }} {{ x.report.job }} {{ self.pct(x.report.percent()) }} {% if let Some(d) = x.delta %}{{ self.signed(d) }}{% endif %} {{ x.report.lines_hit }} / {{ x.report.lines_found }}
{% endif %}

Files sorted by {% if sort == "missed" %}lines missed{% else if sort == "percent" %}coverage, lowest first{% else %}path{% endif %}: {% if sort != "missed" %}lines missed {% endif %}{% if sort != "percent" %}lowest first {% endif %}{% if sort != "path" %}path{% endif %}

{% for f in files %}{% endfor %}
FileCoverageLinesMissed
{{ f.path }} {{ self.pct(f.percent()) }} {{ f.lines_found }} {{ f.missed() }}
{% else %}

Coverage of {{ bookmark }}

No coverage report for {{ bookmark }} yet.

Give a job in .flow/pipeline.kdl an artifact named coverage holding an LCOV report, and the hub reads it when the job uploads it. For Rust:

job "coverage" {
    sandbox "rust"
    exec "cargo" "llvm-cov" "--workspace" "--lcov" "--output-path" "/src/target/lcov.info"
    output {
        artifact "coverage" { path "/src/target/lcov.info" }
    }
}

Istanbul (--reporter=lcov), coverage.py (coverage lcov) and gcov with lcov write LCOV too; Cobertura XML (coverage xml, Coverlet, JaCoCo through cover2cover) is read as well. Paths are read relative to the job's /src.

{% endif %} {% endblock %}