mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-16 20:56:03 +00:00
Expand server tests and enforce coverage
Consolidate server tests under tests/, upgrade them to .NET 10, and add CI coverage thresholds and reports. Expand API and application boundary coverage while fixing related issues in media handling, friend blocking, session crypto, presence, username validation, and local storage.
This commit is contained in:
@@ -52,7 +52,23 @@ jobs:
|
||||
run: dotnet build Govor.Server.slnx --no-restore --configuration Release
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test Govor.Server.Tests/Govor.Server.Tests.csproj --no-build --configuration Release
|
||||
run: dotnet test Govor.Server.slnx --no-build --no-restore --configuration Release --logger trx --results-directory artifacts/test-results --collect "XPlat Code Coverage;Format=json,cobertura"
|
||||
|
||||
- name: Check application coverage
|
||||
shell: pwsh
|
||||
run: ./tests/Measure-ApplicationCoverage.ps1 -ResultsDirectory artifacts/test-results
|
||||
|
||||
- name: Check API source coverage
|
||||
shell: pwsh
|
||||
run: ./tests/Measure-ApplicationCoverage.ps1 -ResultsDirectory artifacts/test-results -AssemblyName Govor.API -ExcludeGeneratedSources -MinimumLineCoverage 98 -MinimumBranchCoverage 92
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results-${{ matrix.database }}
|
||||
path: artifacts/test-results
|
||||
if-no-files-found: ignore
|
||||
|
||||
publish:
|
||||
needs: build-and-test
|
||||
|
||||
Reference in New Issue
Block a user