Upgrade to dotnet 8 #74
Workflow file for this run
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: Build, Test and Package | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_NOLOGO: true | |
steps: | |
- name: Fetch all history for all tags and branches | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: 5.x | |
- name: Use GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Setup .NET 7.0.x | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --configuration Release --no-restore --no-build --nologo --verbosity minimal --settings LivingDocumentation.runsettings --collect:"XPlat Code Coverage" --results-directory ${{ github.workspace }}/coverage | |
- name: ReportGenerator to merge coverage files | |
uses: danielpalme/[email protected] | |
with: | |
reports: coverage/**/*.xml | |
targetdir: ${{ github.workspace }} | |
reporttypes: lcov;Cobertura | |
verbosity: Info | |
- name: Code Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: Cobertura.xml | |
badge: true | |
format: markdown | |
output: both | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
- name: coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: lcov.info | |
- name: Pack | |
run: dotnet pack --configuration Release --no-restore --no-build --verbosity minimal -property:PackageVersion=${{ steps.gitversion.outputs.NuGetVersion }} --output ${{ github.workspace }}/packages | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nupkg | |
path: packages/* |