0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 01:52:15 +02:00
PHPMailer/.codecov.yml
jrfnl c16da1afa8 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 %.
2021-07-04 15:03:01 +02:00

22 lines
342 B
YAML

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