Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module test path not found

I'm trying to configure a GitHub action:

My action contains the job for running the unit test by collecting code coverage. As I see in the log:

Test Run Successful.
Total tests: 336
     Passed: 336
 Total time: 14.0930 Seconds

Calculating coverage result...
  Generating report 'TestResults/coverage.netcoreapp2.1.info'

Nonetheless, after these lines log contains an error message:

  /home/runner/.nuget/packages/coverlet.msbuild/2.9.0/build/coverlet.msbuild.targets(31,5): error : Module test path not found [/home/runner/work/ObservableComputations/ObservableComputations/src/ObservableComputations.Test/ObservableComputations.Test.csproj]

The job is failed.

I tried to run

dotnet test --no-build --filter Name~Casting --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov

at my local machine (MS Windows) and didn't get this error.

Any help is greatly appreciated.

like image 240
Igor Buchelnikov Avatar asked Oct 31 '25 22:10

Igor Buchelnikov


1 Answers

The reason was in -no-build parameter for dotnet test. It seems coverage collecting requires dotnet test to build itself.

like image 160
Igor Buchelnikov Avatar answered Nov 04 '25 13:11

Igor Buchelnikov