diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 18a8259dd33..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: csharp -solution: src/Elasticsearch.sln -script: ./build.sh test-one skipdocs -dist: trusty -mono: 4.6.2 -dotnet: 2.1.300 -env: - global: - - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 -addons: - apt: - sources: - - sourceline: 'deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main' - key_url: 'https://packages.microsoft.com/keys/microsoft.asc' - packages: - - dotnet-sharedframework-microsoft.netcore.app-1.1.2 - - dotnet-sharedframework-microsoft.netcore.app-1.0.5 diff --git a/appveyor.yml b/appveyor.yml index e902cf68bea..f7b6e08f74c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,12 +9,20 @@ build_script: nuget: disable_publish_on_pr: true - + for: - -- branches: - only: - - /^(master|\d+\.x)$/ - artifacts: - - path: .\build\output\_packages\*.nupkg - name: NuGet + + - branches: + only: + - /^(master|\d+\.x)$/ + artifacts: + - path: .\build\output\_packages\*.nupkg + name: NuGet + + - + matrix: + only: + - image: Ubuntu + + build_script: + - ./build.sh test-one skipdocs diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..d2f145825a5 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,40 @@ +jobs: +- job: LinuxUnitTests + pool: + vmImage: 'ubuntu-16.04' + steps: + - script: ./build.sh test-one skipdocs + displayName: 'build and unit test' + - task: PublishTestResults@2 + inputs: + testRunner: VSTest + testResultsFiles: 'src/Tests/Tests/**/*.trx' + testRunTitle: Linux Unit Tests + +- job: WindowsCanaryTests + pool: + vmImage: 'vs2017-win2016' + steps: + - script: build.bat canary skipdocs + displayName: 'build and unit test' + - task: PublishTestResults@2 + inputs: + testRunner: VSTest + testResultsFiles: 'src/Tests/Tests/**/*.trx' + testRunTitle: Windows Unit Tests + +# Enable this when backporting to 7.x 6.x and 5.x, master not in integratable state until 7.x stabalizes and merged to master again +#- job: WindowsIntegrationTests +# dependsOn: WindowsCanaryTests +# pool: +# vmImage: 'vs2017-win2016' +# strategy: +# maxParallel: 5 +# matrix: +# es653: +# esVersion: '6.5.3' +# es632: +# esVersion: '6.3.2' +# steps: +# - script: 'build.bat integrate $(esVersion) skipdocs' +# displayName: '$(esVersion) integration tests' diff --git a/build/scripts/Building.fsx b/build/scripts/Building.fsx index 80ba4cfceb3..81160354829 100644 --- a/build/scripts/Building.fsx +++ b/build/scripts/Building.fsx @@ -31,8 +31,6 @@ module Build = let private compileCore incremental = if not (DotNetCli.isInstalled()) then failwith "You need to install the dotnet command line SDK to build for .NET Core" - let runningSdkVersion = DotNetCli.getVersion() - if (runningSdkVersion <> pinnedSdkVersion) then failwithf "Attempting to run with dotnet.exe with %s but global.json mandates %s" runningSdkVersion pinnedSdkVersion let sourceLink = if not incremental && not isMono && runningRelease then "1" else "" let props = [ diff --git a/build/scripts/Testing.fsx b/build/scripts/Testing.fsx index 6b44de99533..ebf0c14b2b3 100644 --- a/build/scripts/Testing.fsx +++ b/build/scripts/Testing.fsx @@ -15,9 +15,10 @@ open Versioning module Tests = + open Fake.Core open System - let private buildingOnTravis = getEnvironmentVarAsBool "TRAVIS" + let private buildingOnAzurePipeline = getEnvironmentVarAsBool "TF_BUILD" let private buildingOnTeamCity = match environVarOrNone "TEAMCITY_VERSION" with | Some x -> true | None -> false let private setLocalEnvVars() = @@ -39,15 +40,24 @@ module Tests = let private dotnetTest (target: Commandline.MultiTarget) = CreateDir Paths.BuildOutput let command = - let p = ["xunit"; "-parallel"; "all"; "-xml"; "../../.." @@ Paths.Output("TestResults-Desktop-Clr.xml")] - match (target, buildingOnTravis) with - //make sure we don't test against net46 on mono or travis systems + 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 + | (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\""; "-v"; "m"] |> List.append command + | _ -> command + let dotnet = Tooling.BuildTooling("dotnet") - let exitCode = dotnet.ExecWithTimeoutIn "src/Tests/Tests" command (TimeSpan.FromMinutes 30.) + let exitCode = dotnet.ExecWithTimeoutIn "src/Tests/Tests" commandWithCodeCoverage (TimeSpan.FromMinutes 30.) if exitCode > 0 && not buildingOnTeamCity then raise (Exception <| (sprintf "test finished with exitCode %d" exitCode)) let RunReleaseUnitTests() = diff --git a/global.json b/global.json index 01bc3469034..bf8603006cf 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "2.1.300" + "version": "2.2.103" }, "version": "5.6.6" } \ No newline at end of file diff --git a/readme.md b/readme.md index bb6db16ed1f..2669ab4ff2f 100644 --- a/readme.md +++ b/readme.md @@ -6,10 +6,8 @@ Repository for both **NEST** and **Elasticsearch.Net**, the two official [elasti
0.x
1.x
2.x
2.x
5.x
5.x
6.x
6.x
master
master