-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19936 from wordpress-mobile/configure_codecov
Configure Codecov
- Loading branch information
Showing
5 changed files
with
82 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash -eu | ||
|
||
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import | ||
curl -Os https://uploader.codecov.io/latest/linux/codecov | ||
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM | ||
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig | ||
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM | ||
sha256sum -c codecov.SHA256SUM | ||
chmod +x codecov | ||
./codecov -t "$CODECOV_TOKEN" -f "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
comment: | ||
require_changes: true | ||
coverage: | ||
status: | ||
project: off | ||
patch: off | ||
codecov: | ||
max_report_age: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Code coverage | ||
|
||
This project uses [Kover](https://github.com/Kotlin/kotlinx-kover) tool for generating code coverage metrics. | ||
To run the code coverage report for the whole codebase, run `./gradlew koverHtmlReport` and open the HTML report at `WordPress/build/reports/kover/html/index.html`. | ||
|
||
## Coverage exclusions | ||
|
||
To get more precise results of the metrics, some classes are excluded from code coverage calculations. Those classes are e.g. Dagger/Hilt generated code, Acitivies, Fragments, databinding etc. A complete list of exclusions is available in the `config/gradle/code_coverage.gradle` file. | ||
|
||
## Codecov | ||
|
||
We also have `Codecov` integration for getting reports on each PR and observing trends. See [the dashboard](https://app.codecov.io/github/wordpress-mobile/WordPress-Android/) to get more insights. |