You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Copy the token provided on the authorization confirmation page and [add it to your build environment](https://docs.github.com/en/actions/reference/environment-variables) as BARECHECK_GITHUB_APP_TOKEN
11
-
3. Create Github Actions worrkflow from the [example](https://github.com/barecheck/code-coverage-action#workflow-example)
11
+
3. Create Github Actions workflow from the [example](https://github.com/barecheck/code-coverage-action#workflow-example)
12
12
13
13
## Features
14
14
15
15
### Show annotations
16
16
17
-
As a part of code coverage report action also enable an ability to show annotations along with changed lines to keep control what is covered with tests without interapting review process
17
+
As a part of code coverage report action also enable an ability to show annotations along with changed lines to keep control of what is covered with tests without interacting review process
In the rea; world, it's hard to get 100% code coverage and keep it all the time. Instead of showing you all uncovered files Barecheck show only the ones you have changed.
23
+
In the real; world, it's hard to get 100% code coverage and keep it all the time. Instead of showing you all uncovered files Barecheck show only the ones you have changed.
To integrate with this Github Action, you can just use following configuration in your already created workflow. As a result you will get Github Pull request comment with total code coverage
28
+
To integrate with this Github Action, you can just use the following configuration in your already created workflow. As a result, you will get Github Pull request comment with total code coverage
| `github-token` | **yes** | - | Default Github Actions token. Token is not requered if Github application is installed and token passed through `barecheck-github-app-token` |
49
-
| `lcov-file` | **yes** | - | Lcov.info file that was generated after your test coverage command |
50
-
| `barecheck-github-app-token` | **no** | - | Barecheck application token, received after application installation comment. |
51
-
| `base-lcov-file` | **no** | - | Lcov.info file that would be used to compare code coverage. The comparision will be disabled if the file is not passed |
52
-
| `send-summary-comment` | **no** | true | Option to send Github code coverage comment based on the changes that were made in PR |
53
-
| `show-annotations` | **no** | 'warning' | Option to enable Github anotation that would show uncovered files in review tab. Options: ''\| warning \| error |
54
-
| `minimum-ratio` | **no** | '' | Percantage of uncovered lines that is allowed for new changes |
55
-
| `app-name` | **no** | 'Barecheck' | Application name would be used once you have more than one report in your workflow and want to have different reports per application. |
| `github-token` | **yes** | - | Default Github Actions token. The token is not required if GitHub application is installed and the token passed through `barecheck-github-app-token` |
49
+
| `lcov-file` | **yes** | - | Lcov.info file that was generated after your test coverage command |
50
+
| `barecheck-github-app-token` | **no** | - | Barecheck application token, received after application installation comment. |
51
+
| `barecheck-api-key` | **no** | - | Your project API_KEY generated from https://barecheck.com. Use this property to avoid running coverage for the base branch. |
52
+
| `base-lcov-file` | **no** | - | Lcov.info file that would be used to compare code coverage. The comparison will be disabled if the file is not passed |
53
+
| `send-summary-comment` | **no** | true | Option to send Github code coverage comment based on the changes that were made in PR |
54
+
| `show-annotations` | **no** | 'warning' | Option to enable Github annotation that would show uncovered files in review tab. Options: ''\| warning \| error |
55
+
| `minimum-ratio` | **no** | '' | Percentage of uncovered lines that are allowed for new changes |
56
+
| `app-name` | **no** | 'Barecheck' | Application name would be used once you have more than one report in your workflow and want to have different reports per application. |
56
57
57
58
## Workflow Example
58
59
59
-
In order to compare your new changes report and base branch you are able to use Github artifacts as in the example below:
60
+
In order to compare your new changes report and the base branch you are able to use Github artifacts as in the example below:
60
61
61
62
```yml
62
63
name: Code Coverage
@@ -111,7 +112,7 @@ jobs:
111
112
# Compares two code coverage files and generates report as a comment
If you have monorepo with more then one application and want to have different code coverage reports you can use `app-name` input property to define different application names that would be used as a part of title.
129
+
If you have monorepo with more than one application and want to have different code coverage reports you can use `app-name` input property to define different application names that would be used as a part of the title.
Barecheck cloud is still in beta but there are already some numbers of teams that are using it. Especially, for complex projects where running coverage for the main branch twice just to compare results might lead to performance problems.
156
+
Action will not send any data besides just the coverage number and commit sha to the cloud so you can securely use this feature.
`barecheck-api-key`has a bigger priority than `base-lcov-file` . Once you passed of them, only API KEY will be used. All other parameters can be used in the same way.
0 commit comments