Skip to content

Commit c6f0a79

Browse files
author
Luca Piccioni
committed
Add tests on GitHub action Linux step.
1 parent a3a12cc commit c6f0a79

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,27 @@ jobs:
7272
- name: Build
7373
run: dotnet build OpenGL.Net.sln --configuration ${{ matrix.configuration }} --no-restore
7474

75+
- name: Test
76+
run: dotnet test OpenGL.Net.sln --configuration ${{ matrix.configuration }} --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
77+
78+
- name: Upload coverage reports to Codecov
79+
if: matrix.configuration == 'Debug'
80+
uses: codecov/codecov-action@v4
81+
with:
82+
token: ${{ secrets.CODECOV_TOKEN }}
83+
files: ./coverage/**/coverage.cobertura.xml
84+
flags: linux
85+
name: linux-coverage
86+
fail_ci_if_error: false
87+
88+
- name: Upload coverage artifacts
89+
if: matrix.configuration == 'Debug'
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: coverage-report-linux-${{ matrix.configuration }}
93+
path: ./coverage/**/coverage.cobertura.xml
94+
retention-days: 30
95+
7596
build-macos:
7697
runs-on: macos-latest
7798
strategy:

0 commit comments

Comments
 (0)