Code Coverage¶
To make sure that new code is tested, we keep track of the code coverage.
To do this we use Codecov.io. The Codecov page for GIRAF is: https://codecov.io/gh/aau-giraf.
Usage¶
This section shortly explains how to use Codecov
Codecov.io¶
On the Codecov site, the GIRAF repositories using Codecov can be seen. In the different repositories, multiple things can be seen. For example, the code coverage, and changes in code coverage for every commit.
Pull Request Comments¶
On every pull request, Codecov will comment on the pull request.
This comment is updated when new commits are added to the pull request.
Setup¶
GitHub Actions Workflows¶
Flutter Repositories¶
In Flutter repositories, the --coverage
argument is added to the flutter test
step in the workflow. This generates a coverage file, which is then uploaded by
the next step:
1 2 3 4 5 6 |
|
.NET Repositories¶
In the .NET repositories, the package coverlet.msbuild
is used to generate code
coverage reports. The package is installed with in GirafRest.Test
.
Then in the workflow, in the test step, some arguments are added.
1 2 3 4 |
|
Beneath is an explanation of the arguments:
1 2 3 |
|
Config¶
The codecov integration is configured in the codecov.yml
file in the respective
repositories. Documentation for the config file can be seen at https://docs.codecov.io/docs/codecov-yaml.
Affected Repositories¶
Right now codecov is used in: