Skip to content
Merged
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
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ jobs:
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
run: dotnet tool update dotnet-sonarscanner --tool-path .sonar/scanner

- name: Install dotnet-coverage tool
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
run: dotnet tool update dotnet-coverage --global

- name: Begin SonarCloud analysis
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
run: |
Expand All @@ -64,19 +68,25 @@ jobs:
/o:"visus" \
/d:sonar.token="$SONAR_TOKEN" \
/d:sonar.host.url="https://sonarcloud.io" \
/d:sonar.cs.vscoveragexml.reportsPaths="**/TestResults/**/coverage.xml" \
/d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" \
/d:sonar.cs.vstest.reportsPaths="**/TestResults/**/*.trx"

- name: Build
run: dotnet build -c Release --no-restore

- name: Run tests
run: |
dotnet test -c Release --no-build --no-restore \
dotnet test -c Release --no-build --no-restore -- \
--coverage \
--coverage-output coverage.xml \
--coverage-output-format xml \
-- --report-trx
--report-trx

- name: Merge coverage reports
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
run: |
dotnet-coverage merge "tests/**/TestResults/*.xml" \
--output coverage.xml \
--output-format xml

- name: Upload test results
if: always()
Expand Down
Loading