Roadie
Code Coverage logo

Backstage Code Coverage Plugin

Created by alde & nissayeva

Installation Instructions

These instructions apply to self-hosted Backstage only. To use this plugin on Roadie, visit the docs.

Install the plugin into Backstage

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

Modify your EntityPage.tsx to render code coverage reports.

typescript
// 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.

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

Things to Know

Changelog

This changelog is produced from commits made to the Code Coverage plugin since about 1 year ago. It may not contain information about all commits. Releases and version bumps are intentionally omitted. This changelog is generated by AI.

Breaking changes

  • Remove support for the legacy backend in @backstage-community/plugin-code-coverage-backend PR #2587 merged 8 months ago
    Migrate to the new backend system

Bug fixes

  • Handle divide by zero in the Code Coverage table in @backstage-community/plugin-code-coverage PR #1898 merged 11 months ago

Deprecations

  • Mark the legacy backend as deprecated in @backstage-community/plugin-code-coverage-backend PR #2046 merged 10 months ago

Maintenance

  • Remove unused dev dependency canvas in @backstage-community/plugin-code-coverage PR #3565 merged 6 months ago
  • Update @types/uuid dev dependency in @backstage-community/plugin-code-coverage-backend PR #2233 merged 8 months ago

Set up Backstage in minutes with Roadie