@@ -173,12 +173,14 @@ jobs:
173173 id : test
174174 if : false
175175 working-directory : build/tests
176- run : ./test_moonlight --gtest_color=yes
176+ run : ./test_moonlight --gtest_color=yes --gtest_output=xml:test_results.xml
177177
178178 - name : Generate gcov report
179179 id : test_report
180180 # any except canceled or skipped
181- if : always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
181+ if : >-
182+ always() &&
183+ (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
182184 working-directory : build
183185 run : |
184186 ${{ steps.python-path.outputs.python-path }} -m pip install gcovr
@@ -196,6 +198,22 @@ jobs:
196198 steps.test_report.outcome == 'success'
197199 run : cat build/coverage.xml
198200
201+ - name : Upload test results to Codecov
202+ # any except canceled or skipped
203+ if : >-
204+ always() &&
205+ (steps.test.outcome == 'success' || steps.test.outcome == 'failure') &&
206+ startsWith(github.repository, 'LizardByte/')
207+ uses : codecov/test-results-action@v1
208+ with :
209+ disable_search : true
210+ fail_ci_if_error : true
211+ files : ./build/tests/test_results.xml
212+ flags : ${{ runner.os }}
213+ handle_no_reports_found : true
214+ token : ${{ secrets.CODECOV_TOKEN }}
215+ verbose : true
216+
199217 # todo: upload coverage in separate job similar to LizardByte/libdisplaydevice
200218 - name : Upload coverage
201219 # any except canceled or skipped
@@ -208,7 +226,7 @@ jobs:
208226 disable_search : true
209227 fail_ci_if_error : true
210228 files : ./build/coverage.xml
211- flags : " ${{ runner.os }}"
229+ flags : ${{ runner.os }}
212230 token : ${{ secrets.CODECOV_TOKEN }}
213231 verbose : true
214232
0 commit comments