mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
ci(homebrew): enable test coverage
This commit is contained in:
37
.github/workflows/CI.yml
vendored
37
.github/workflows/CI.yml
vendored
@@ -633,26 +633,25 @@ jobs:
|
||||
- name: Generate gcov report
|
||||
id: test_report
|
||||
# any except canceled or skipped
|
||||
# TODO: fix coverage, no .gcno files are being created
|
||||
# TODO: .gcno files are supposed to be created next to .o files
|
||||
if: false
|
||||
# if: >-
|
||||
# always() &&
|
||||
# matrix.release != true &&
|
||||
# (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
if: >-
|
||||
always() &&
|
||||
matrix.release != true &&
|
||||
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
working-directory: ${{ steps.test.outputs.buildpath }}
|
||||
run: |
|
||||
cp -rf ${{ steps.test.outputs.buildpath }}/build/ ./build/
|
||||
cd build
|
||||
sudo chmod -R 777 ${{ steps.test.outputs.buildpath }}
|
||||
ls -Ra
|
||||
|
||||
${{ steps.python.outputs.python-path }} -m pip install gcovr
|
||||
${{ steps.python.outputs.python-path }} -m gcovr . -r ../src \
|
||||
${{ steps.python.outputs.python-path }} -m gcovr \
|
||||
--exclude-noncode-lines \
|
||||
--exclude-throw-branches \
|
||||
--exclude-unreachable-branches \
|
||||
--filter src/ \
|
||||
--gcov-object-directory=build \
|
||||
--verbose \
|
||||
--xml-pretty \
|
||||
-o coverage.xml
|
||||
-o ${{ github.workspace }}/build/coverage.xml
|
||||
|
||||
- name: Upload test results to Codecov
|
||||
# any except canceled or skipped
|
||||
@@ -673,13 +672,11 @@ jobs:
|
||||
|
||||
- name: Upload coverage
|
||||
# any except canceled or skipped
|
||||
# TODO: enable this once coverage report is fixed
|
||||
if: false
|
||||
# if: >-
|
||||
# always() &&
|
||||
# matrix.release != true &&
|
||||
# (steps.test_report.outcome == 'success') &&
|
||||
# startsWith(github.repository, 'LizardByte/')
|
||||
if: >-
|
||||
always() &&
|
||||
matrix.release != true &&
|
||||
(steps.test_report.outcome == 'success') &&
|
||||
startsWith(github.repository, 'LizardByte/')
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
disable_search: true
|
||||
@@ -992,7 +989,9 @@ jobs:
|
||||
- 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')
|
||||
shell: msys2 {0}
|
||||
working-directory: build
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user