Code Coverage logo

Backstage Code Coverage Plugin

See code coverage summaries for your software in Backstage

Created by alde & nissayeva

Available on Roadie

Set up Backstage in minutes with Roadie

Installation steps

Install the plugin into Backstage

yarn --cwd packages/app add @backstage-community/plugin-code-coverage

Modify your EntityPage.tsx to render code coverage reports.

// packages/app/src/components/catalog/EntityPage.tsx

import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
+import { EntityCodeCoverageContent } from '@backstage-community/plugin-code-coverage';

@@ -226,6 +227,10 @@ const defaultEntityPage = (
    <EntityLayout.Route path="/docs" title="Docs">
      {techdocsContent}
    </EntityLayout.Route>
+
+    <EntityLayout.Route path="/code-coverage" title="Code Coverage">
+      <EntityCodeCoverageContent />
+    </EntityLayout.Route>
  </EntityLayout>
);

Add backstage.io/code-coverage annotations to relevant catalog-info.yaml files.

...
metadata:
  annotations:
    backstage.io/code-coverage: enabled

Found a mistake? Update these instructions.

Things to know

Set up Backstage in minutes with Roadie