CI: Consolidate unit test rules, codecov pathfix #754
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit contains two changes to gcov report generation and codecov upload.
Separation of the file parser unit tests from the others was causing them to be exluded from report.cov.unit.
This patch reworks the rules to replace MOM_file_parser_tests.F90.gcov with driver code, build/unit/test_%.F90.gcov.
This does assume at all drivers will look the same (test_*.F90) but that part can be reworked if it ever becomes a problem in the future.
Thanks to @adcroft for multiple suggestions in this PR.
Github appears to internally store all its repositories in another directory with the name as the repo (in this case MOM6/).
Normally this is hidden to everyone, but it was causing some confusion with the codecov upload tool, and was unable to match the source code to the .gcov report.
The .codecov.yml config file was modified to adjust for this path change, and should now correctly allow coverage to be reported alongside the file.
(The GitHub Actions app likely makes this adjustment, but we need to do it manually since we upload directly to Codecov.io.)