Merge pull request #14303 from maxwellE/maxwelle/update_code_coverage_plugin_setup_steps
Update instructions for coverage plugin
This commit is contained in:
@@ -2,6 +2,31 @@
|
||||
|
||||
This is the frontend part of the code-coverage plugin. It displays code coverage summaries for your entities.
|
||||
|
||||
## Installation
|
||||
|
||||
`yarn workspace app add @backstage/plugin-code-coverage`
|
||||
|
||||
Finally you need to import and render the code coverage entity, in `packages/app/src/components/catalog/EntityPage.tsx` add the following:
|
||||
|
||||
```diff
|
||||
@@ -70,6 +70,7 @@ import {
|
||||
|
||||
import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
|
||||
import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
|
||||
+import { EntityCodeCoverageContent } from '@backstage/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>
|
||||
);
|
||||
```
|
||||
|
||||
## Configuring your entity
|
||||
|
||||
In order to use this plugin, you must set the `backstage.io/code-coverage` annotation on entities for which coverage ingestion has been enabled.
|
||||
|
||||
Reference in New Issue
Block a user