Bug description
When using the game-ci/unity-test-runner@v4.3.1 action, a CodeCoverage folder is created in the root directory. However, when subsequently using actions/upload-artifact@v4, the following message appears:
“No files were found with the provided path: CodeCoverage. No artifacts will be uploaded.”
Steps to reproduce
- Execute the tests:
uses: game-ci/unity-test-runner@v4.3.1
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: ${{ matrix.testMode }} Test Results
coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*;dontClear'
- Upload the CodeCoverage results to Artifacts:
uses: actions/upload-artifact@v4
if: always()
with:
name: Coverage results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.coveragePath }}
- The result is:
Run actions/upload-artifact@v4
with:
name: Coverage results for editmode
path: CodeCoverage
if-no-files-found: warn
compression-level: 6
overwrite: false
Warning: No files were found with the provided path: CodeCoverage. No artifacts will be uploaded.
I suspect there might be permission issues or misconfiguration related to the CodeCoverage package in Unity.
If that’s the case, please provide the correct configuration for the CodeCoverage package in Unity.
Expected behavior
I expect to receive a message similar to:
Run actions/upload-artifact@v4
With the provided path, there will be 2 files uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 36991
Finished uploading artifact content to blob storage!
Additional details
- The project path is defined as:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- ./
testMode:
- playmode
- editmode
-
After executing game-ci/unity-test-runner@v4.3.1, I can confirm that the CodeCoverage and editmode-artifacts folders are created. They also appear to have the same permissions

-
The content of the CodeCoverage folder is not empty

-
Content of the CodeCoverage/workspace-opencov directory

-
Content of the CodeCoverage/workspace-opencov/EditMode directory

-
I’ve attempted changing permissions using run: sudo chown -R $USER:$USER "CodeCoverage" and run: sudo chmod -R a+rw "CodeCoverage":


-
I renamed the CodeCoverage folder to CodeCoverageRenamed, and there were modifications to permissions


-
The actions/upload-artifact@v4 action seems fine for other foulders with regular files, but the CodeCoverage folder isn’t behaving as expected.

-
Even when applying actions/upload-artifact@v4 at the root of the project, the CodeCoverage folder doesn’t appear in the generated .zip artifact.

-
According to the documentation, coverage results are generated with root permissions, so you may need elevated permissions (like sudo) for later steps:
Note Coverage results are generated with root permission so to move or edit the output in later steps you may need to use elevated permissions such as sudo.

- The project has both EditMode and PlayMode tests.
- The CodeCoverage package is installed.
Link to repository: BaseProject
Bug description
When using the
game-ci/unity-test-runner@v4.3.1action, a CodeCoverage folder is created in the root directory. However, when subsequently usingactions/upload-artifact@v4, the following message appears:Steps to reproduce
I suspect there might be permission issues or misconfiguration related to the CodeCoverage package in Unity.
If that’s the case, please provide the correct configuration for the CodeCoverage package in Unity.
Expected behavior
I expect to receive a message similar to:
Additional details
After executing

game-ci/unity-test-runner@v4.3.1, I can confirm that the CodeCoverage and editmode-artifacts folders are created. They also appear to have the same permissionsThe content of the CodeCoverage folder is not empty

Content of the CodeCoverage/workspace-opencov directory

Content of the CodeCoverage/workspace-opencov/EditMode directory

I’ve attempted changing permissions using


run: sudo chown -R $USER:$USER "CodeCoverage"andrun: sudo chmod -R a+rw "CodeCoverage":I renamed the CodeCoverage folder to CodeCoverageRenamed, and there were modifications to permissions


The

actions/upload-artifact@v4action seems fine for other foulders with regular files, but the CodeCoverage folder isn’t behaving as expected.Even when applying

actions/upload-artifact@v4at the root of the project, the CodeCoverage folder doesn’t appear in the generated .zip artifact.According to the documentation, coverage results are generated with root permissions, so you may need elevated permissions (like sudo) for later steps:
Link to repository: BaseProject