Skip to content

Commit 9ab0fc5

Browse files
committed
fix codecov publishing
1 parent 7908a79 commit 9ab0fc5

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)