Skip to content

Commit 9685bfd

Browse files
fix(ci): correct test artifact paths in unity-tests workflow (#561)
- Explicitly set artifactsPath for game-ci/unity-test-runner - Fix upload paths to match where artifacts are actually created - Add if-no-files-found: warn to prevent failures on missing artifacts The test runner outputs to repo root artifacts/ folder, not inside the project directory. Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2f2f12d commit 9685bfd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/unity-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
projectPath: ${{ inputs.project_path }}
6161
unityVersion: ${{ inputs.unity_version }}
6262
testMode: EditMode
63+
artifactsPath: artifacts/EditMode
6364
githubToken: ${{ secrets.GITHUB_TOKEN }}
6465
checkName: EditMode Test Results
6566

@@ -76,6 +77,7 @@ jobs:
7677
projectPath: ${{ inputs.project_path }}
7778
unityVersion: ${{ inputs.unity_version }}
7879
testMode: PlayMode
80+
artifactsPath: artifacts/PlayMode
7981
githubToken: ${{ secrets.GITHUB_TOKEN }}
8082
checkName: PlayMode Test Results
8183

@@ -85,15 +87,17 @@ jobs:
8587
uses: actions/upload-artifact@v4
8688
with:
8789
name: EditMode-results-${{ inputs.unity_version }}
88-
path: ${{ inputs.project_path }}/artifacts/EditMode
90+
path: artifacts/EditMode
91+
if-no-files-found: warn
8992
retention-days: 14
9093

9194
- name: Upload PlayMode test results
9295
if: always() && (inputs.test_mode == 'All' || inputs.test_mode == 'PlayMode')
9396
uses: actions/upload-artifact@v4
9497
with:
9598
name: PlayMode-results-${{ inputs.unity_version }}
96-
path: ${{ inputs.project_path }}/artifacts/PlayMode
99+
path: artifacts/PlayMode
100+
if-no-files-found: warn
97101
retention-days: 14
98102

99103
# Generate test summary

0 commit comments

Comments
 (0)