forked from dotnet/roslyn-analyzers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAfterSolutionBuild.targets
25 lines (20 loc) · 1.31 KB
/
AfterSolutionBuild.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>
<Target Name="ReportCodeCoverage" AfterTargets="Test" Condition="'$(Configuration)' == 'Debug' and '$(CODECOV_TOKEN)' != ''">
<PropertyGroup>
<_CodecovPath>$(NuGetPackageRoot)codecov\$(CodecovVersion)\tools\Codecov.exe</_CodecovPath>
</PropertyGroup>
<ItemGroup>
<_CoverageReports Include="$(ArtifactsTestResultsDir)*.coverage" />
<_CodecovArgs Include="-f;@(_CoverageReports)" />
<_CodecovArgs Include="-r;$(QualifiedRepoName)" Condition="'$(QualifiedRepoName)' != ''" />
<_CodecovArgs Include="--pr;$(ghprbPullId)" Condition="'$(ghprbPullId)' != ''" />
<_CodecovArgs Include="-b;$(BUILD_NUMBER)" Condition="'$(BUILD_NUMBER)' != ''" />
<_CodecovArgs Include="--branch;$(ghprbTargetBranch)" Condition="'$(ghprbTargetBranch)' != ''" />
<_CodecovArgs Include="-c;$(ghprbActualCommit)" Condition="'$(ghprbActualCommit)' != ''" />
<_CodecovArgs Include="-n;$(JOB_NAME)" Condition="'$(JOB_NAME)' != ''" />
<_CodecovArgs Include="--flag;$(Configuration)" Condition="'$(Configuration)' != ''" />
</ItemGroup>
<Exec Command=""$(_CodecovPath)" @(_CodecovArgs, ' ')" />
</Target>
</Project>