# Can't upload coverage report generated with game-ci/unity-test-runner

**URL:** <https://community.codecov.com/t/cant-upload-coverage-report-generated-with-game-ci-unity-test-runner/4022>\
**Category:** Support\
**Created:** [December 25, 2022, 7:47pm UTC](https://community.codecov.com/t/cant-upload-coverage-report-generated-with-game-ci-unity-test-runner/4022 "2022-12-25T19:47:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elringus](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/elringus/32/2128_2.png) [@Elringus](https://community.codecov.com/u/Elringus)\
**Post date:** [December 25, 2022, 7:47pm UTC](https://community.codecov.com/t/cant-upload-coverage-report-generated-with-game-ci-unity-test-runner/4022/1 "2022-12-25T19:47:58Z")

</div>

I’m using [game-ci GitHub action](https://github.com/game-ci/unity-test-runner) to test and cover a Unity project and `codecov-action@v3` to upload the results. It’s been working fine for about a year, but then, probably due to some ci action update, the coverage reports are no longer detected by codecov.

Here is the failing job: [debug cover · Elringus/SpriteDicing@28a1600 · GitHub](https://github.com/Elringus/SpriteDicing/actions/runs/3777199963/jobs/6420902535)

I’ve found where `unity-test-runner` appears to be writing coverage report:

```auto
2022-12-25T19:35:49.5043090Z [Code Coverage] Code Coverage Results were saved in /github/workspace/CodeCoverage/workspace-opencov/EditMode/TestCoverageResults_0000.xml

```

— and tried specifying the path with codecov:

```auto
- name: Upload coverage report
  uses: codecov/codecov-action@v3
  with:
    root_dir: /github/workspace/CodeCoverage/workspace-opencov/EditMode
    files: '*.xml'
    fail_ci_if_error: true
    verbose: true

```

But it still fails to find the files with the following log:

```auto
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n -Q github-action-3.1.1 -Z -f *.xml -R /github/workspace/CodeCoverage/workspace-opencov/EditMode -v
[2022-12-25T19:35:52.108Z] ['verbose'] Start of uploader: 1671996952108...
[2022-12-25T19:35:52.110Z] ['info'] 
     _____ _
    / ____ | | |
   | | _____ | | ______  _______
   | | / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |__/ (_| (_) \ V /
    \ _____\___ / \ __,_|\___ |\ ___\___ / \_/

  Codecov report uploader 0.3.2
[2022-12-25T19:35:52.110Z] ['info'] => Project root located at: /github/workspace/CodeCoverage/workspace-opencov/EditMode
[2022-12-25T19:35:52.111Z] ['info'] -> No token specified or token is empty
[2022-12-25T19:35:52.111Z] ['verbose'] Start of network processing...
[2022-12-25T19:35:52.112Z] ['verbose'] Searching for files in /github/workspace/CodeCoverage/workspace-opencov/EditMode
[2022-12-25T19:35:52.124Z] ['verbose'] coveragepy is not installed
[2022-12-25T19:35:52.125Z] ['info'] Searching for coverage files...
[2022-12-25T19:35:52.173Z] ['verbose'] Preparing to clean the following coverage paths: *.xml
[2022-12-25T19:35:52.174Z] ['error'] None of the following appear to exist as files: *.xml
[2022-12-25T19:35:52.175Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!
[2022-12-25T19:35:52.175Z] ['verbose'] The error stack is: Error: Error while cleaning paths. No paths matched existing files!
    at cleanCoverageFilePaths (/snapshot/repo/dist/src/helpers/files.js)
    at main (/snapshot/repo/dist/src/index.js)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-12-25T19:35:52.176Z] ['verbose'] End of uploader: 68 milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

```

---

<div class="post-metadata">

**Author:** ![Elringus](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/elringus/32/2128_2.png) [@Elringus](https://community.codecov.com/u/Elringus)\
**Post date:** [December 26, 2022, 2:42pm UTC](https://community.codecov.com/t/cant-upload-coverage-report-generated-with-game-ci-unity-test-runner/4022/2 "2022-12-26T14:42:33Z")

</div>

Nevermind, codecov had nothing to do with the issue; `game-ci` was reporting incorrect paths of the generated reports. Fixed with the following:

```auto
- name: Run tests and generate coverage report
  uses: game-ci/unity-test-runner@v2
  id: tests
  env:
    UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
  with:
    githubToken: ${{ secrets.GITHUB_TOKEN }}
    testMode: editmode
    coverageOptions: useProjectSettings;generateAdditionalMetrics
    customParameters: -debugCodeOptimization -enableCodeCoverage

- name: Upload coverage report
  uses: codecov/codecov-action@v3
  with:
    files: ${{ steps.tests.outputs.coveragePath }}/**/*.xml
    fail_ci_if_error: true

```
