Skip to content

Commit

Permalink
Trying code cov report merging for multiple target frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairjevans committed Nov 7, 2020
1 parent 00857d7 commit 086a064
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(CollectCoverage)' == 'true'">
<MergeWith>$(CoverletOutput)/coverage.$(TargetFramework).json</MergeWith>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ try {
# Generate Coverage Report
Write-Message "Generating Codecov Report"
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
& bash codecov.sh -f "coverage.info"
& bash codecov.sh -f "coverage.*.json"
}

# Finished
Expand Down
3 changes: 1 addition & 2 deletions build/Autofac.Build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ function Invoke-Test {
--configuration Release `
--logger:trx `
/p:CollectCoverage=true `
/p:CoverletOutput="..\..\" `
/p:MergeWith="..\..\coverage.json" `
/p:CoverletOutput='../../' `
/p:CoverletOutputFormat="json%2clcov" `
/p:ExcludeByAttribute=CompilerGeneratedAttribute `
/p:ExcludeByAttribute=GeneratedCodeAttribute
Expand Down

0 comments on commit 086a064

Please sign in to comment.