Fixes nuget publish #151
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore ./src | |
- name: Build | |
run: dotnet build ./src --no-restore | |
- name: Test | |
run: dotnet test ./src --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage --filter Category!=IntegrationTest | |
- name: Merge Code Coverage files with Reportgenerator | |
uses: danielpalme/[email protected] | |
with: | |
reports: 'coverage/**/coverage.cobertura.xml' | |
targetdir: 'coveragesummary' | |
reporttypes: 'Html;Cobertura;XMLSummary;Badges' | |
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off | |
tag: '${{ github.run_number }}_${{ github.run_id }}' | |
toolpath: 'reportgeneratortool' | |
- name: Code Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: coveragesummary/Cobertura.xml | |
badge: true | |
fail_below_min: true | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: '60 80' | |
- 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 | |