Entire directories of code missing from coverage

I have searched for similar issues before creating this topic.
I have verified that my repository is using the Codecov GitHub app, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.

Description

I have 15 directories in my /src/ directory, each full of code. Only 4 of these are actually visible in the coverage section of the site.

I have 2 test suites, Virtual and Legacy. Virtual and Legacy output coverage files.

At least 8 of the directories in /src/ are covered by the Virtual tests and coverage, but are seemingly entirely invisible.

I have verified locally and on my CI/CD that the tests run, finish and produce coverage reports.

CI/CD URL

Please provide a link to the CI/CD run.
I cannot do this sorry, but I will explain a little on how I use it.
Currently I have two workflows, an upload that runs for each PR and also one that runs on every push for the main branch “develop”.

This is how I use the action for both.

      - name: Codecov Upload
        uses: codecov/codecov-action@v3.1.0
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: tests/**/bin/x64/**/net48/*coverage.xml
          fail_ci_if_error: true
          verbose: true

Codecov Output

Please provide the full output of running the uploader on your CI/CD. This will typically have the Codecov logo as ASCII.

==> windows OS detected
https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (9dce1ac2d35f550d96d46f8a1116b4f03740d61ca4508bfccdbf1ea1dfeabe4d  codecov.exe)
==> Running version latest
==> Running version v0.3.2
C:\Users\admin\actions-runner\_work\_actions\codecov\codecov-action\v3.1.0\dist\codecov.exe -n "" -Q github-action-3.1.0 -Z -f tests/**/bin/x64/**/net48/*coverage.xml -C d755d7261ae6157640228352bc9b7e2ac16288e9 -v
[2022-09-30T17:57:14.761Z] ['verbose'] Start of uploader: 1664560634760...
[2022-09-30T17:57:14.762Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2022-09-30T17:57:14.853Z] ['info'] => Project root located at: C:/Users/admin/actions-runner/_work/myProject/myProject
[2022-09-30T17:57:14.854Z] ['info'] ->  Token found by environment variables
[2022-09-30T17:57:14.855Z] ['verbose'] Start of network processing...
[2022-09-30T17:57:14.855Z] ['verbose'] Searching for files in C:/Users/admin/actions-runner/_work/myProject/myProject
[2022-09-30T17:57:14.929Z] ['verbose'] coveragepy is not installed
[2022-09-30T17:57:14.929Z] ['info'] Searching for coverage files...
[2022-09-30T17:57:15.286Z] ['info'] Warning: Some files passed via the -f flag would normally be excluded from search.
[2022-09-30T17:57:15.286Z] ['info'] If Codecov encounters issues processing your reports, please review https://docs.codecov.com/docs/supported-report-formats
[2022-09-30T17:57:15.286Z] ['verbose'] Preparing to clean the following coverage paths: tests/**/bin/x64/**/net48/*coverage.xml,tests/omTests/bin/x64/Release/net48/omTests_virtual_coverage.xml,src/om/tests/exporter.tests/bin/x64/Release/net48/exporter.Tests_legacy_coverage.xml,src/om/tests/omTests/bin/x64/Release/net48/omTests_legacy_coverage.xml,src/om/tests/tkplug.tests/bin/x64/Release/net48/tk.Tests_legacy_coverage.xml
[2022-09-30T17:57:15.287Z] ['info'] => Found 4 possible coverage files:
  tests/omTests/bin/x64/Release/net48/omTests_virtual_coverage.xml
  src/om/tests/exporter.tests/bin/x64/Release/net48/exporter.Tests_legacy_coverage.xml
  src/om/tests/omTests/bin/x64/Release/net48/omTests_legacy_coverage.xml
  src/om/tests/tkplug.tests/bin/x64/Release/net48/tk.Tests_legacy_coverage.xml
[2022-09-30T17:57:15.287Z] ['verbose'] End of network processing
[2022-09-30T17:57:15.288Z] ['info'] Processing C:/Users/admin/actions-runner/_work/myProject/myProject/tests/omTests/bin/x64/Release/net48/omTests_virtual_coverage.xml...
[2022-09-30T17:57:15.358Z] ['info'] Processing C:/Users/admin/actions-runner/_work/myProject/myProject/src/om/tests/exporter.tests/bin/x64/Release/net48/exporter.Tests_legacy_coverage.xml...
[2022-09-30T17:57:15.436Z] ['info'] Processing C:/Users/admin/actions-runner/_work/myProject/myProject/src/om/tests/omTests/bin/x64/Release/net48/omTests_legacy_coverage.xml...
[2022-09-30T17:57:15.537Z] ['info'] Processing C:/Users/admin/actions-runner/_work/myProject/myProject/src/om/tests/tkplug.tests/bin/x64/Release/net48/tk.Tests_legacy_coverage.xml...
[2022-09-30T17:57:16.098Z] ['info'] Using manual override from args.
[2022-09-30T17:57:16.099Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-09-30T17:57:16.099Z] ['verbose'] -> Using the following env variables:
[2022-09-30T17:57:16.099Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2022-09-30T17:57:16.099Z] ['verbose']      GITHUB_HEAD_REF: (3519)-myPullRequest
[2022-09-30T17:57:16.099Z] ['verbose']      GITHUB_REF: refs/pull/1013/merge
[2022-09-30T17:57:16.099Z] ['verbose']      GITHUB_REPOSITORY: structurecraft/myProject
[2022-09-30T17:57:16.099Z] ['verbose']      GITHUB_RUN_ID: 3160649795
[2022-09-30T17:57:16.099Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2022-09-30T17:57:16.099Z] ['verbose']      GITHUB_SHA: a1567dff9947575adaddee907156c99b02393170
[2022-09-30T17:57:16.099Z] ['verbose']      GITHUB_WORKFLOW: DevelopBuildAndTest
[2022-09-30T17:57:16.100Z] ['verbose'] Using the following upload parameters:
[2022-09-30T17:57:16.100Z] ['verbose'] myProject
[2022-09-30T17:57:16.100Z] ['verbose'] build
[2022-09-30T17:57:16.100Z] ['verbose'] buildURL
[2022-09-30T17:57:16.100Z] ['verbose'] commit
[2022-09-30T17:57:16.100Z] ['verbose'] job
[2022-09-30T17:57:16.100Z] ['verbose'] pr
[2022-09-30T17:57:16.100Z] ['verbose'] service
[2022-09-30T17:57:16.100Z] ['verbose'] slug
[2022-09-30T17:57:16.100Z] ['verbose'] name
[2022-09-30T17:57:16.100Z] ['verbose'] tag
[2022-09-30T17:57:16.100Z] ['verbose'] flags
[2022-09-30T17:57:16.100Z] ['verbose'] parent
[2022-09-30T17:57:16.101Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.3.2&token=*******&myProject=%283519%29-myPullRequest&build=3160649795&build_url=https%3A%2F%2Fgithub.com%2Fstructurecraft%2FmyProject%2Factions%2Fruns%2F3160649795&commit=d755d7261ae6157640228352bc9b7e2ac16288e9&job=DevelopBuildAndTest&pr=1013&service=github-actions&slug=structurecraft%2FmyProject&name=&tag=&flags=&parent=
[2022-09-30T17:57:16.101Z] ['verbose'] Passed token was 36 characters long
[2022-09-30T17:57:16.101Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.3.2&myProject=%283519%29-myPullRequest&build=3160649795&build_url=https%3A%2F%2Fgithub.com%2Fstructurecraft%2FmyProject%2Factions%2Fruns%2F3160649795&commit=d755d7261ae6157640228352bc9b7e2ac16288e9&job=DevelopBuildAndTest&pr=1013&service=github-actions&slug=structurecraft%2FmyProject&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2022-09-30T17:57:16.472Z] ['info'] https://app.codecov.io/github/structurecraft/myProject/commit/d755d7261ae6157640228352bc9b7e2ac16288e9
https://storage.googleapis.com/codecov/v4/raw/2022-09-30/2D8D336F8539209876E4F0ABFC7B75CE/d755d7261ae6157640228352bc9b7e2ac16288e9/344274cf-4470-4e99-8a68-011411c12548.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20220930%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220930T175716Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=f69534ef6d389dd25734b6c28ab5466e6fc39ef5e09441f9773f42555d0fe41f
[2022-09-30T17:57:16.472Z] ['verbose'] Returned upload url: https://storage.googleapis.com/codecov/v4/raw/2022-09-30/2D8D336F8539209876E4F0ABFC7B75CE/d755d7261ae6157640228352bc9b7e2ac16288e9/344274cf-4470-4e99-8a68-011411c12548.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20220930%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220930T175716Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=f69534ef6d389dd25734b6c28ab5466e6fc39ef5e09441f9773f42555d0fe41f
[2022-09-30T17:57:16.472Z] ['info'] Uploading...
[2022-09-30T17:57:16.828Z] ['info'] {"status":"success","resultURL":"https://app.codecov.io/github/structurecraft/myProject/commit/d755d7261ae6157640228352bc9b7e2ac16288e9"}
[2022-09-30T17:57:16.828Z] ['verbose'] End of uploader: 2068 milliseconds

Expected Results

I expected all the covered lines of code to show as covered, and I expected to see more of the code that exists in the solution.

Actual Results

Many, many of them are not covered.
Below is a recreation of the File Coverage view, because I can’t seem to add a picture.
The | before the line of code is the Red highlight shown in the page. As you can see, the coverage is 0.00%. The tests for this piece of code cover the entire class as far as I can tell. And this is one of the files shown in the web interface. Many of which still aren’t.

public static class GeometryUtils
{
	public static GeometryBase DuplicateWithoutData(this GeometryBase geom)
	{
		| GeometryBase gbase = geom.Duplicate();
		| PurgeGeometry(gbase);
		| return gbase;
	}
	public static void PurgeGeometry(this GeometryBase geom)
	{
		| geom.UserDictionary.Clear();
		| geom.GetUserStrings().Clear();
	}
	public static void PurgeObject(this Rhino.DocObjects.RhinoObject obj)
	{
		| PurgeGeometry(obj.Geometry);
		| obj.UserDictionary.Clear();
	}
}

Additional Information

Any additional information, configuration, or data that might be necessary to reproduce the issue.
I don’t have a codecov.yaml in my repository, just in the website.

codecov:
  disable_default_path_fixes: true
fixes:
- ^^myProject/myProject/::myProject/
flags:
  legacy:
    paths:
    - ^src/om/tests/.*
  virtual:
    paths:
    - ^tests/.*
ignore:
- (?s:.*/[^\/]+\.py.*)\Z
- ^^src/om/_Legacy.*
- ^/obj.*
- ^/bin.*
- ^/scripts.*
- ^/docs.*
- ^/art.*
- (?s:.*/[^\/]+\.xml.*)\Z

I am happy to provide any other information that I can.

Thanks again,

– cs

@clicketyclackety could you provide a few files/directories that are explicitly missing?

1 Like

Directories

plug
plug.commands (no unit tests)
myProject
myProject.desktop
ghx
ghx.commands (no unit tests)

Files

It would seem that as long as the directories are registered, so are the files, which is great :slight_smile:, however many registered files don’t seem to have the correct test coverage

Hi @clicketyclackety I’m struggling a little bit here. Did you rename the project?