Skip to content

Commit fa82f59

Browse files
committed
coverlet does not work yet but hopeful coverlet-coverage/coverlet#329 fixes it in the future
1 parent b8c0dac commit fa82f59

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

azure-pipelines.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
inputs:
1313
testRunner: VSTest
1414
testResultsFiles: '**/*.trx'
15+
testRunTitle: Linux Unit Tests
1516

1617
- job: Windows
1718
pool:
@@ -23,4 +24,5 @@ jobs:
2324
inputs:
2425
testRunner: VSTest
2526
testResultsFiles: '**/*.trx'
27+
testRunTitle: Windows Unit Tests
2628

build/scripts/Testing.fsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,20 @@ module Tests =
4040
let private dotnetTest (target: Commandline.MultiTarget) =
4141
CreateDir Paths.BuildOutput
4242
let command =
43-
let p = ["test"; "."]
43+
let p = ["test"; "."; "-c"; "RELEASE"]
4444
//make sure we only test netcoreapp on linux or requested on the command line to only test-one
4545
match (target, Environment.isLinux) with
4646
| (_, true)
4747
| (Commandline.MultiTarget.One, _) -> ["--framework"; "netcoreapp2.1"] |> List.append p
4848
| _ -> p
4949
let commandWithCodeCoverage =
50+
// TODO /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
51+
// Using coverlet.msbuild package
52+
// https://github.com/tonerdo/coverlet/issues/110
53+
// Bites us here as well a PR is up already but not merged will try again afterwards
54+
// https://github.com/tonerdo/coverlet/pull/329
5055
match (buildingOnAzurePipeline) with
51-
| (true) -> [ "--logger"; "trx"; "--collect"; "\"Code Coverage\""] |> List.append command
56+
| (true) -> [ "--logger"; "trx"; "--collect"; "\"Code Coverage\""; "-v"; "m"] |> List.append command
5257
| _ -> command
5358

5459
let dotnet = Tooling.BuildTooling("dotnet")

src/Tests/Tests.Configuration/tests.default.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# tracked by git).
66

77
# mode either u (unit test), i (integration test) or m (mixed mode)
8-
mode: i
8+
mode: u
99
# the elasticsearch version that should be started
1010
# Can be a snapshot version of sonatype or "latest" to get the latest snapshot of sonatype
1111
elasticsearch_version: 6.5.3

src/Tests/Tests/Tests.csproj

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
<VersionSuffix>alpha</VersionSuffix>
99
<NoWarn>$(NoWarn);xUnit1013</NoWarn>
1010
</PropertyGroup>
11-
<ItemGroup>
12-
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta1-build3642" />
13-
</ItemGroup>
1411
<ItemGroup>
1512
<ProjectReference Include="..\Tests.Core\Tests.Core.csproj" />
1613
<PackageReference Include="Bogus" Version="22.1.2" />

0 commit comments

Comments
 (0)