Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Consolidate unit test rules, codecov pathfix #754

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

marshallward
Copy link
Member

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.)

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.)
Copy link
Member

@adcroft adcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@adcroft
Copy link
Member

adcroft commented Nov 5, 2024

OK, since #741 is up next, I'm testing this one at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25386

@adcroft adcroft merged commit 88ee9dd into NOAA-GFDL:dev/gfdl Nov 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants