diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53c2cac..01eba00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,12 +133,14 @@ jobs: Xvfb ${DISPLAY} -screen 0 1024x768x24 & fi - ./test_tray --gtest_color=yes + ./test_tray --gtest_color=yes --gtest_output=xml:test_results.xml - name: Generate gcov report id: test_report # any except canceled or skipped - if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure') + if: >- + always() && + (steps.test.outcome == 'success' || steps.test.outcome == 'failure') working-directory: build run: | ${{ steps.python-path.outputs.python-path }} -m pip install gcovr @@ -162,6 +164,22 @@ jobs: fi echo "flags=${flags}" >> $GITHUB_OUTPUT + # todo: upload coverage in separate job similar to LizardByte/libdisplaydevice + - name: Upload test results to Codecov + # any except canceled or skipped + if: >- + always() && + (steps.test.outcome == 'success' || steps.test.outcome == 'failure') && + startsWith(github.repository, 'LizardByte/') + uses: codecov/test-results-action@v1 + with: + disable_search: true + fail_ci_if_error: true + files: ./build/tests/test_results.xml + flags: "${{ steps.codecov_flags.outputs.flags }}" + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + # todo: upload coverage in separate job similar to LizardByte/libdisplaydevice - name: Upload coverage # any except canceled or skipped