Skip to content

Commit 92d5219

Browse files
feat(ci): add Codecov upload to release workflow (#605)
* feat(ci): add Codecov upload to release workflow Add upload-coverage job that runs after Unity tests complete, uploading coverage reports to Codecov with util and ui flags. This ensures coverage is tracked for releases, not just PRs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * fix(ci): set fail_ci_if_error to true for consistency Match pr-tests.yml behavior where Codecov upload failures will fail the workflow. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> --------- Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1273966 commit 92d5219

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,47 @@ jobs:
160160
uses: ./.github/workflows/unity-tests.yml
161161
secrets: inherit
162162

163+
upload-coverage:
164+
name: Upload Coverage
165+
needs: run-tests
166+
runs-on: ubuntu-latest
167+
permissions:
168+
contents: read
169+
steps:
170+
- name: Checkout repository
171+
uses: actions/checkout@v4
172+
173+
- name: Download coverage artifacts
174+
uses: actions/download-artifact@v4
175+
with:
176+
name: Coverage-results-2022.3.55f1
177+
path: coverage
178+
179+
- name: List coverage files
180+
run: |
181+
echo "Coverage directory structure:"
182+
find coverage -type f -name "*.xml" 2>/dev/null || echo "No XML files found"
183+
184+
- name: Upload coverage to Codecov (util package)
185+
uses: codecov/codecov-action@v4
186+
with:
187+
token: ${{ secrets.CODECOV_TOKEN }}
188+
files: coverage/**/TestCoverageResults*.xml
189+
flags: util
190+
name: jengine-util
191+
fail_ci_if_error: true
192+
verbose: true
193+
194+
- name: Upload coverage to Codecov (ui package)
195+
uses: codecov/codecov-action@v4
196+
with:
197+
token: ${{ secrets.CODECOV_TOKEN }}
198+
files: coverage/**/TestCoverageResults*.xml
199+
flags: ui
200+
name: jengine-ui
201+
fail_ci_if_error: true
202+
verbose: true
203+
163204
prepare-release:
164205
name: Prepare Release
165206
needs: [validate, run-tests]

0 commit comments

Comments
 (0)