Skip to content

Commit 3d9d911

Browse files
authored
Merge branch 'GitTools:main' into feature/2388_root-configuration-should-propoagate-branches
2 parents 97f4ca5 + 9ab0fc5 commit 3d9d911

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

build/build/Tasks/Test/PublishCoverage.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,20 @@ public override bool ShouldRun(BuildContext context)
1919

2020
public override void Run(BuildContext context)
2121
{
22-
var coverageFiles = context.GetFiles($"{Paths.TestOutput}/*.coverage.*.xml");
22+
var coverageFiles = context
23+
.GetFiles($"{Paths.TestOutput}/*.coverage.*.xml")
24+
.Select(file => context.MakeRelative(file).ToString()).ToArray();
2325

2426
var token = context.Credentials?.CodeCov?.Token;
2527
if (string.IsNullOrEmpty(token))
2628
{
2729
throw new InvalidOperationException("Could not resolve CodeCov token.");
2830
}
2931

30-
foreach (var coverageFile in coverageFiles)
32+
context.Codecov(new CodecovSettings
3133
{
32-
context.Codecov(new CodecovSettings
33-
{
34-
Files = new[] { coverageFile.ToString() },
35-
Token = token
36-
});
37-
}
34+
Files = coverageFiles,
35+
Token = token
36+
});
3837
}
3938
}

0 commit comments

Comments
 (0)