CI: Consolidate unit test rules, codecov pathfix#754
Merged
adcroft merged 1 commit intoNOAA-GFDL:dev/gfdlfrom Nov 5, 2024
Merged
CI: Consolidate unit test rules, codecov pathfix#754adcroft merged 1 commit intoNOAA-GFDL:dev/gfdlfrom
adcroft merged 1 commit intoNOAA-GFDL:dev/gfdlfrom
Conversation
This commit contains two changes to gcov report generation and codecov upload. 1. 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. 2. 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.)
adcroft
approved these changes
Nov 4, 2024
Member
adcroft
left a comment
There was a problem hiding this comment.
This should be high priority since it fixes the lack of codecov reports and cleans up a mess I left in the .testing Makefile. I'd at least like to see this accepted before #741 since that PR will be well served by a proper codecov report.
Member
|
OK, since #741 is up next, I'm testing this one at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25386 |
This was referenced Nov 27, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.)