Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 57 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,14 @@ jobs:
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
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
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.outputs.python-path }} -m pip install gcovr
Expand All @@ -448,6 +450,22 @@ jobs:
--xml-pretty \
-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
# any except canceled or skipped
if: >-
Expand Down Expand Up @@ -603,7 +621,7 @@ jobs:
- name: Validate Homebrew Formula
id: test
if: matrix.release != true
uses: LizardByte/homebrew-release-action@v2024.1115.14934
uses: LizardByte/homebrew-release-action@v2025.503.165455
with:
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
git_email: ${{ secrets.GH_BOT_EMAIL }}
Expand All @@ -623,15 +641,7 @@ jobs:
# matrix.release != true &&
# (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
run: |
# if linux
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/
cp -rf ${{ steps.test.outputs.buildpath }}/build/ ./build/
cd build
ls -Ra

Expand All @@ -644,6 +654,23 @@ jobs:
--xml-pretty \
-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
# any except canceled or skipped
# TODO: enable this once coverage report is fixed
Expand Down Expand Up @@ -701,7 +728,7 @@ jobs:
github.repository_owner == 'LizardByte' &&
matrix.release &&
needs.setup_release.outputs.publish_release == 'true'
uses: LizardByte/homebrew-release-action@v2024.1115.14934
uses: LizardByte/homebrew-release-action@v2025.503.165455
with:
formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb
git_email: ${{ secrets.GH_BOT_EMAIL }}
Expand Down Expand Up @@ -959,7 +986,7 @@ jobs:
shell: msys2 {0}
working-directory: build/tests
run: |
./test_sunshine.exe --gtest_color=yes
./test_sunshine.exe --gtest_color=yes --gtest_output=xml:test_results.xml

- name: Generate gcov report
id: test_report
Expand All @@ -977,6 +1004,22 @@ jobs:
--xml-pretty \
-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
# any except canceled or skipped
if: >-
Expand Down
3 changes: 2 additions & 1 deletion packaging/sunshine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ def caveats
system bin/"sunshine", "--version"

# 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
Loading