From 25fa9820881cc330b4fa980b64a0cad9c3891d87 Mon Sep 17 00:00:00 2001 From: moh-hassan Date: Thu, 12 Mar 2020 19:50:37 +0200 Subject: [PATCH] Add Linux as CI in appveyor --- README.md | 7 +-- appveyor.yml | 45 +++++++++++-------- .../Fakes/HelpTextWithLineBreaks_Options.cs | 2 +- .../Unit/UnParserExtensionsTests.cs | 4 +- 4 files changed, 34 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 75901a63..aa1145e5 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ __This library provides _hassle free_ command line parsing with a constantly upd - Verbs can be array of types collected from Plugins or IoC container. - Define [verb commands](https://github.com/commandlineparser/commandline/wiki/Verbs) similar to `git commit -a`. - Support default verb. -- Support Mutable and Imutable types. +- Support Mutable and Immutable types. - Support HelpText localization. - Support ordering of options in HelpText. - Support [Mutually Exclusive Options](https://github.com/commandlineparser/commandline/wiki/Mutually-Exclusive-Options) and Options groups. @@ -38,8 +38,9 @@ __This library provides _hassle free_ command line parsing with a constantly upd - Support Asynchronous programming with async and await. - Unparsing support: `CommandLine.Parser.Default.FormatCommandLine(T options)`. - CommandLineParser.FSharp package is F#-friendly with support for `option<'a>`, see [demo](https://github.com/commandlineparser/commandline/blob/master/demo/fsharp-demo.fsx). _NOTE: This is a separate NuGet package._ -- Include good wiki documentation with lot of examples ready to run online. -- Support Sourcelink and symbolic package. +- Include wiki documentation with lot of examples ready to run online. +- Support Source Link and symbolic nuget package snupkg. +- Tested in Windows, Linux Ubuntu 18.04 and Mac OS. - Most of features applies with a [CoC](http://en.wikipedia.org/wiki/Convention_over_configuration) philosophy. - C# demo: source [here](https://github.com/commandlineparser/commandline/tree/master/demo/ReadText.Demo). diff --git a/appveyor.yml b/appveyor.yml index 283a785c..04882c0c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,9 @@ #version should be only changed with RELEASE eminent, see RELEASE.md version: 2.8.0-ci-{build} -image: Visual Studio 2019 +image: + - Visual Studio 2019 + - ubuntu1804 clone_depth: 1 pull_requests: @@ -26,8 +28,7 @@ skip_commits: files: - docs/* - art/* - - '**/*.md' - #- .travis.yml + - '**/*.md' - .gitignore - .editorconfig message: /updated readme.*|update readme.*s|update docs.*|update version.*|update changelog.*/ @@ -39,12 +40,15 @@ environment: build_script: - cmd: dotnet build src/CommandLine/ -c Release --version-suffix %PACKAGE_VERSION% /p:BuildTarget=%BUILD_TARGET% +- sh: dotnet build src/CommandLine/ -c Release --version-suffix $PACKAGE_VERSION /p:BuildTarget=$BUILD_TARGET test_script: - cmd: dotnet test tests/CommandLine.Tests/ /p:BuildTarget=%BUILD_TARGET% +- sh: dotnet test tests/CommandLine.Tests/ /p:BuildTarget=$BUILD_TARGET -f netcoreapp2.0 after_test: - cmd: dotnet pack src/CommandLine/ -c Release --version-suffix %PACKAGE_VERSION% /p:BuildTarget=%BUILD_TARGET% +- sh: dotnet pack src/CommandLine/ -c Release --version-suffix $PACKAGE_VERSION /p:BuildTarget=$BUILD_TARGET artifacts: - path: 'src/CommandLine/bin/Release/*.nupkg' @@ -56,20 +60,25 @@ on_failure: tree /f /a >files.lst appveyor PushArtifact .\files.lst -DeploymentName "Failed Build File Listing" -deploy: -- provider: GitHub - auth_token: - secure: hVyVwHl0JiVq0VxXB4VMRWbUtrGclIzadfnWFcWCQBLvbgMLahLBnWlwGglT63pZ - artifact: 'NuGetPackages' - prerelease: false - force_update: true #fsharp package runs as separate build job, so have to force_update to add fsharp.nuget added - on: - APPVEYOR_REPO_TAG: true +for: +- + matrix: + only: + - image: Visual Studio 2019 + deploy: + - provider: GitHub + auth_token: + secure: hVyVwHl0JiVq0VxXB4VMRWbUtrGclIzadfnWFcWCQBLvbgMLahLBnWlwGglT63pZ + artifact: 'NuGetPackages' + prerelease: false + force_update: true #fsharp package runs as separate build job, so have to force_update to add fsharp.nuget added + on: + APPVEYOR_REPO_TAG: true -- provider: NuGet - api_key: - secure: Ab4T/48EyIJhVrqkfKdUxmHUtseEVuXuyrGACxZ0KN35rb/BzABlBM2YjZojicvT - artifact: 'NuGetPackages' - on: - APPVEYOR_REPO_TAG: true + - provider: NuGet + api_key: + secure: Ab4T/48EyIJhVrqkfKdUxmHUtseEVuXuyrGACxZ0KN35rb/BzABlBM2YjZojicvT + artifact: 'NuGetPackages' + on: + APPVEYOR_REPO_TAG: true diff --git a/tests/CommandLine.Tests/Fakes/HelpTextWithLineBreaks_Options.cs b/tests/CommandLine.Tests/Fakes/HelpTextWithLineBreaks_Options.cs index c93e73aa..b8974ca7 100644 --- a/tests/CommandLine.Tests/Fakes/HelpTextWithLineBreaks_Options.cs +++ b/tests/CommandLine.Tests/Fakes/HelpTextWithLineBreaks_Options.cs @@ -10,7 +10,7 @@ It has multiple lines. [Option(HelpText = @"This is a help text description where we want - The left pad after a linebreak to be honoured so that + the left pad after a linebreak to be honoured so that we can sub-indent within a description.")] public string StringValu2 { get; set; } diff --git a/tests/CommandLine.Tests/Unit/UnParserExtensionsTests.cs b/tests/CommandLine.Tests/Unit/UnParserExtensionsTests.cs index 3edb8f20..2c95e893 100644 --- a/tests/CommandLine.Tests/Unit/UnParserExtensionsTests.cs +++ b/tests/CommandLine.Tests/Unit/UnParserExtensionsTests.cs @@ -207,8 +207,8 @@ public static void UnParsing_instance_with_int_nullable(bool skipDefault, int? v } [Theory] - [InlineData(Shapes.Circle, "--shape circle")] - [InlineData(Shapes.Square, "--shape square")] + [InlineData(Shapes.Circle, "--shape Circle")] + [InlineData(Shapes.Square, "--shape Square")] [InlineData(null, "")] public static void UnParsing_instance_with_nullable_enum(Shapes? shape, string expected) {