Skip to content

Commit

Permalink
coverlet does not work yet but hopeful coverlet-coverage/coverlet#329
Browse files Browse the repository at this point in the history
…fixes it in the future
  • Loading branch information
Mpdreamz committed Feb 22, 2019
1 parent b8c0dac commit fa82f59
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
testRunTitle: Linux Unit Tests

- job: Windows
pool:
Expand All @@ -23,4 +24,5 @@ jobs:
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
testRunTitle: Windows Unit Tests

9 changes: 7 additions & 2 deletions build/scripts/Testing.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,20 @@ module Tests =
let private dotnetTest (target: Commandline.MultiTarget) =
CreateDir Paths.BuildOutput
let command =
let p = ["test"; "."]
let p = ["test"; "."; "-c"; "RELEASE"]
//make sure we only test netcoreapp on linux or requested on the command line to only test-one
match (target, Environment.isLinux) with
| (_, true)
| (Commandline.MultiTarget.One, _) -> ["--framework"; "netcoreapp2.1"] |> List.append p
| _ -> p
let commandWithCodeCoverage =
// TODO /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
// Using coverlet.msbuild package
// https://github.com/tonerdo/coverlet/issues/110
// Bites us here as well a PR is up already but not merged will try again afterwards
// https://github.com/tonerdo/coverlet/pull/329
match (buildingOnAzurePipeline) with
| (true) -> [ "--logger"; "trx"; "--collect"; "\"Code Coverage\""] |> List.append command
| (true) -> [ "--logger"; "trx"; "--collect"; "\"Code Coverage\""; "-v"; "m"] |> List.append command
| _ -> command

let dotnet = Tooling.BuildTooling("dotnet")
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Tests.Configuration/tests.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# tracked by git).

# mode either u (unit test), i (integration test) or m (mixed mode)
mode: i
mode: u
# the elasticsearch version that should be started
# Can be a snapshot version of sonatype or "latest" to get the latest snapshot of sonatype
elasticsearch_version: 6.5.3
Expand Down
3 changes: 0 additions & 3 deletions src/Tests/Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
<VersionSuffix>alpha</VersionSuffix>
<NoWarn>$(NoWarn);xUnit1013</NoWarn>
</PropertyGroup>
<ItemGroup>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta1-build3642" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Tests.Core\Tests.Core.csproj" />
<PackageReference Include="Bogus" Version="22.1.2" />
Expand Down

0 comments on commit fa82f59

Please sign in to comment.