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
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"commands": [
"nbgv"
]
},
"dotnet-reportgenerator-globaltool": {
"version": "5.5.11",
"commands": [
"reportgenerator"
]
}
}
}
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
name: Build SlnUp
if: "!contains(github.event.head_commit.message, 'ci skip')"
uses: ./.github/workflows/workflow_build.yml
secrets: inherit
with:
# don't check format on CI builds due to common breaking changes in the .NET SDK
checkFormat: false
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
{ os: macos, buildAgent: macos-14 }
]
uses: ./.github/workflows/workflow_build.yml
secrets: inherit
with:
artifactSuffix: ${{ matrix.platform.os }}
buildAgent: ${{ matrix.platform.buildAgent }}
35 changes: 22 additions & 13 deletions .github/workflows/workflow_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,29 @@ jobs:
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --coverage --coverage-output-format cobertura

- name: Install dotnet-coverage tool
run: dotnet tool install --global dotnet-coverage

- name: Merge coverage reports
run: dotnet-coverage merge __artifacts/test-results/**/*.cobertura.xml -f cobertura -o __artifacts/test-results/codecov/coverage.cobertura.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
- name: Generate coverage report and enforce thresholds
run: >
dotnet tool run reportgenerator
"-reports:__artifacts/test-results/**/*.cobertura.xml"
"-targetdir:__artifacts/coverage-report"
"-reporttypes:MarkdownSummaryGithub;Html"
"-classfilters:-System.Text.RegularExpressions.Generated*"
"minimumCoverageThresholds:lineCoverage=95"
"minimumCoverageThresholds:branchCoverage=95"

- name: Publish coverage summary
# Publish even when the threshold check above fails the build.
if: ${{ !cancelled() && hashFiles('__artifacts/coverage-report/SummaryGithub.md') != '' }}
shell: pwsh
run: Get-Content __artifacts/coverage-report/SummaryGithub.md | Add-Content -Path $env:GITHUB_STEP_SUMMARY

- name: Upload coverage report
if: ${{ !cancelled() && hashFiles('__artifacts/coverage-report/SummaryGithub.md') != '' }}
uses: actions/upload-artifact@v7
with:
name: codecov
directory: __artifacts/test-results/codecov
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
name: coverage-report_${{ inputs.artifactSuffix }}
path: __artifacts/coverage-report
retention-days: 14

- name: Upload package artifact
if: ${{ inputs.uploadArtifacts }}
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ that allows you to easily change the Visual Studio version information in a
solution file using a Visual Studio version number.

![CI Build](https://github.com/craigktreasure/SlnUp/workflows/SlnUp-CI/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/craigktreasure/SlnUp/branch/main/graph/badge.svg?token=SV8DFLV2H4)](https://codecov.io/gh/craigktreasure/SlnUp)
[![NuGet](https://img.shields.io/nuget/v/SlnUp)](https://www.nuget.org/packages/SlnUp/)
[![NuGet](https://img.shields.io/nuget/dt/SlnUp)](https://www.nuget.org/packages/SlnUp/)

Expand Down
6 changes: 0 additions & 6 deletions codecov.yml

This file was deleted.