forked from PHPMailer/PHPMailer
-
Notifications
You must be signed in to change notification settings - Fork 894
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH Actions: set up code coverage monitoring via codecov
The Codecov service is a way to monitor test vs code coverage of a project over time and allows for the code coverage % + delta to be reported in each PR. This commits: * Adds a Codecov configuration. * Adds a convenience script to the `composer.json` file to run the tests with or without code coverage. * Adds a new matrix variable to the GH Actions `test` workflow to run the tests with code coverage and send the results to the Codecov service. Notes: - This disables the code coverage reporting in the "normal" test runs, including disabling `xdebug` for those runs which should make them slightly faster. - This splits the test runs into two sets: * High/low PHP are being run with code coverage (and have been removed from the "normal" test run matrix). * For all other PHP versions, the tests are being run without code coverage. * Adds a badge to the README to show the current code coverage %.
- Loading branch information
Showing
4 changed files
with
65 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
codecov: | ||
notify: | ||
after_n_builds: 2 | ||
|
||
coverage: | ||
round: nearest | ||
# Status will be green when coverage is between 70 and 100%. | ||
range: "70...100" | ||
status: | ||
project: | ||
default: | ||
threshold: 2% | ||
paths: | ||
- "src" | ||
patch: | ||
default: | ||
threshold: 0% | ||
paths: | ||
- "src" | ||
|
||
comment: false |
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
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