Skip to content

Commit 68f5aa3

Browse files
committed
Upload code coverage
1 parent 9503b67 commit 68f5aa3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.config/dotnet-tools.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
"commands": [
1414
"pwsh"
1515
]
16+
},
17+
"codecov.tool": {
18+
"version": "1.9.0",
19+
"commands": [
20+
"codecov"
21+
]
1622
}
1723
}
1824
}

eng/Coverage.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<CoverageFormat Condition="'$(CoverageFormat)' == ''">cobertura</CoverageFormat>
5+
<CoverageOutputPath Condition="'$(CoverageOutputPath)' == ''">coverage.cobertura.xml</CoverageOutputPath>
56
</PropertyGroup>
67

78
<PropertyGroup>
@@ -16,6 +17,7 @@
1617

1718
<Target Name="AfterCollectCodeCoverage" AfterTargets="RunTests">
1819
<AfterCollectCodeCoverageTask PipeName="%(TestToRun.Filename)" CoverletId="$(CoverletId)" />
20+
<!-- <Exec Command="$(DotNetTool) tool run codecov -f '$(CoverageOutputPath)'" /> -->
1921
</Target>
2022

2123
<UsingTask
@@ -39,6 +41,7 @@
3941
@"$(DotNetTool)",
4042
$@"tool run coverlet ""{TestAssembly}"" " +
4143
@"--format $(CoverageFormat) " +
44+
@"--output ""$(CoverageOutputPath)"" " +
4245
@"--target ""$(DotNetTool)"" " +
4346
@"--targetargs ""tool run pwsh " +
4447
$"$server = [System.IO.Pipes.NamedPipeServerStream]::new('{PipeName}');" +

0 commit comments

Comments
 (0)