Update TargetFramework to net9 (#13) #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET 9 CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dotnet: [ '9.0.x' ] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet }} | |
- name: Build | |
run: dotnet build --configuration Release | |
- name: Install | |
run: dotnet tool install -g dotnet-reportgenerator-globaltool | |
- name: Test | |
run: | | |
rm -rf MsTestResults | |
dotnet test --configuration Release --no-build --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --results-directory MsTestResults | |
reportgenerator -reports:MsTestResults/*/coverage.cobertura.xml -targetdir:Coverlet-html | |
- name: Archive artifacts (code coverage) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report-${{ matrix.dotnet }} | |
path: Coverlet-html |