ci(codecov): add test analytics (#3841)
This commit is contained in:
71
.github/workflows/CI.yml
vendored
71
.github/workflows/CI.yml
vendored
@@ -431,12 +431,14 @@ jobs:
|
|||||||
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||||
sleep 5 # give Xvfb time to start
|
sleep 5 # give Xvfb time to start
|
||||||
|
|
||||||
./test_sunshine --gtest_color=yes
|
./test_sunshine --gtest_color=yes --gtest_output=xml:test_results.xml
|
||||||
|
|
||||||
- name: Generate gcov report
|
- name: Generate gcov report
|
||||||
id: test_report
|
id: test_report
|
||||||
# any except canceled or skipped
|
# 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
|
working-directory: build
|
||||||
run: |
|
run: |
|
||||||
${{ steps.python.outputs.python-path }} -m pip install gcovr
|
${{ steps.python.outputs.python-path }} -m pip install gcovr
|
||||||
@@ -448,6 +450,22 @@ jobs:
|
|||||||
--xml-pretty \
|
--xml-pretty \
|
||||||
-o coverage.xml
|
-o coverage.xml
|
||||||
|
|
||||||
|
- 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: ${{ runner.os }}
|
||||||
|
handle_no_reports_found: true
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
verbose: true
|
||||||
|
|
||||||
- name: Upload coverage
|
- name: Upload coverage
|
||||||
# any except canceled or skipped
|
# any except canceled or skipped
|
||||||
if: >-
|
if: >-
|
||||||
@@ -603,7 +621,7 @@ jobs:
|
|||||||
- name: Validate Homebrew Formula
|
- name: Validate Homebrew Formula
|
||||||
id: test
|
id: test
|
||||||
if: matrix.release != true
|
if: matrix.release != true
|
||||||
uses: LizardByte/homebrew-release-action@v2024.1115.14934
|
uses: LizardByte/homebrew-release-action@v2025.503.165455
|
||||||
with:
|
with:
|
||||||
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
|
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
|
||||||
git_email: ${{ secrets.GH_BOT_EMAIL }}
|
git_email: ${{ secrets.GH_BOT_EMAIL }}
|
||||||
@@ -623,15 +641,7 @@ jobs:
|
|||||||
# matrix.release != true &&
|
# matrix.release != true &&
|
||||||
# (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
# (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||||
run: |
|
run: |
|
||||||
# if linux
|
cp -rf ${{ steps.test.outputs.buildpath }}/build/ ./build/
|
||||||
if [ "${{ runner.os }}" == "Linux" ]; then
|
|
||||||
prefix="/tmp"
|
|
||||||
else
|
|
||||||
prefix="/private/tmp"
|
|
||||||
fi
|
|
||||||
|
|
||||||
brew_dir=$(find ${prefix} -type d -name "sunshine-*" -maxdepth 1 2>/dev/null)
|
|
||||||
cp -rf $brew_dir/build/ ./build/
|
|
||||||
cd build
|
cd build
|
||||||
ls -Ra
|
ls -Ra
|
||||||
|
|
||||||
@@ -644,6 +654,23 @@ jobs:
|
|||||||
--xml-pretty \
|
--xml-pretty \
|
||||||
-o coverage.xml
|
-o coverage.xml
|
||||||
|
|
||||||
|
- name: Upload test results to Codecov
|
||||||
|
# any except canceled or skipped
|
||||||
|
if: >-
|
||||||
|
always() &&
|
||||||
|
matrix.release != true &&
|
||||||
|
(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: ${{ steps.test.outputs.testpath }}/test_results.xml
|
||||||
|
flags: ${{ matrix.os_name }}-${{ matrix.os_version }} (Homebrew)
|
||||||
|
handle_no_reports_found: true
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
verbose: true
|
||||||
|
|
||||||
- name: Upload coverage
|
- name: Upload coverage
|
||||||
# any except canceled or skipped
|
# any except canceled or skipped
|
||||||
# TODO: enable this once coverage report is fixed
|
# TODO: enable this once coverage report is fixed
|
||||||
@@ -701,7 +728,7 @@ jobs:
|
|||||||
github.repository_owner == 'LizardByte' &&
|
github.repository_owner == 'LizardByte' &&
|
||||||
matrix.release &&
|
matrix.release &&
|
||||||
needs.setup_release.outputs.publish_release == 'true'
|
needs.setup_release.outputs.publish_release == 'true'
|
||||||
uses: LizardByte/homebrew-release-action@v2024.1115.14934
|
uses: LizardByte/homebrew-release-action@v2025.503.165455
|
||||||
with:
|
with:
|
||||||
formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb
|
formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb
|
||||||
git_email: ${{ secrets.GH_BOT_EMAIL }}
|
git_email: ${{ secrets.GH_BOT_EMAIL }}
|
||||||
@@ -959,7 +986,7 @@ jobs:
|
|||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
working-directory: build/tests
|
working-directory: build/tests
|
||||||
run: |
|
run: |
|
||||||
./test_sunshine.exe --gtest_color=yes
|
./test_sunshine.exe --gtest_color=yes --gtest_output=xml:test_results.xml
|
||||||
|
|
||||||
- name: Generate gcov report
|
- name: Generate gcov report
|
||||||
id: test_report
|
id: test_report
|
||||||
@@ -977,6 +1004,22 @@ jobs:
|
|||||||
--xml-pretty \
|
--xml-pretty \
|
||||||
-o coverage.xml
|
-o coverage.xml
|
||||||
|
|
||||||
|
- 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: ${{ runner.os }}
|
||||||
|
handle_no_reports_found: true
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
verbose: true
|
||||||
|
|
||||||
- name: Upload coverage
|
- name: Upload coverage
|
||||||
# any except canceled or skipped
|
# any except canceled or skipped
|
||||||
if: >-
|
if: >-
|
||||||
|
|||||||
@@ -351,6 +351,7 @@ index 5b3638d..aca9481 100644
|
|||||||
system bin/"sunshine", "--version"
|
system bin/"sunshine", "--version"
|
||||||
|
|
||||||
# run the test suite
|
# run the test suite
|
||||||
system bin/"test_sunshine", "--gtest_color=yes"
|
system bin/"test_sunshine", "--gtest_color=yes", "--gtest_output=xml:test_results.xml"
|
||||||
|
assert_path_exists testpath/"test_results.xml"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user