game-ci / unity-test-runner

Run tests for any Unity project
https://github.com/marketplace/actions/unity-test-runner
MIT License
206 stars 135 forks source link

chmod: cannot access '/github/workspace/CodeCoverage' #260

Open hraytilakhealthcare opened 7 months ago

hraytilakhealthcare commented 7 months ago

Bug description

After running the unit-test action for edit mode tests with the following error :

chmod: cannot access '/github/workspace/CodeCoverage'

How to reproduce

Trigger the unit test ci.

Not sure.

Additional details

The error is triggered when some of my unit-test fails. My understanding is that I should have a nice-ish report and not a bash error ?

The error indicates that the file CodeCoverage does not exist. The last line of dist/platforms/ubuntu/run_tests.sh does make a call to chmod without checking for file presence. Maybe wrapping it with a check would help ?

if test -f "FULL_COVERAGE_RESULTS_PATH"; then
  chmod -R a+r "$FULL_COVERAGE_RESULTS_PATH"
fi

I checked the various paramaters for code coverage to see if I could disable the feature, but as far as I know, the file name CodeCoverage is hardcoded in the action and the chmod cannot be avoided via configuration.

See the following places for the hardcoded string :

Is there a way to avoid the failure of the CI ?

QuakeEye commented 6 months ago

I fixed this by installing the Code Coverage tool in my unity project, the error does not seem to show that this might be the issue, but once I installed that package to the project it instantly worked!