From c9118d6982961e2c4160facddf3f2bd0fe1fd380 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 8 Feb 2022 11:14:11 +0800 Subject: [PATCH] [C#] test .net6 projects in Github actions (#11544) * test .net 6 in github workflow * trigger workflow * fix run * fix test * trigger build * update samples --- .github/workflows/samples-dotnet.yaml | 31 +++++++++++++++++++++++++++ appveyor.yml | 8 ------- 2 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/samples-dotnet.yaml diff --git a/.github/workflows/samples-dotnet.yaml b/.github/workflows/samples-dotnet.yaml new file mode 100644 index 00000000000..f6545044a0b --- /dev/null +++ b/.github/workflows/samples-dotnet.yaml @@ -0,0 +1,31 @@ +name: Samples C# .Net 6 + +on: + push: + paths: + - 'samples/client/petstore/csharp-netcore/**net6.0**/' + pull_request: + paths: + - 'samples/client/petstore/csharp-netcore/**net6.0**/' +jobs: + build: + name: Build .Net projects + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0 + - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + - name: Build + working-directory: ${{ matrix.sample }} + run: dotnet build Org.OpenAPITools.sln + - name: Test + working-directory: ${{ matrix.sample }} + run: dotnet test Org.OpenAPITools.sln diff --git a/appveyor.yml b/appveyor.yml index 6d5579f0b45..85b45d48132 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,10 +50,6 @@ build_script: - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-httpclient\Org.OpenAPITools.sln # build C# API client (generichost) - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-generichost-netstandard2.0\Org.OpenAPITools.sln - # build C# API client (generichost) - - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-generichost-net6.0\Org.OpenAPITools.sln - # build C# API client (generichost) - - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-generichost-net6.0-nrt\Org.OpenAPITools.sln # build C# API client (netcore) - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient\Org.OpenAPITools.sln - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClientCore\Org.OpenAPITools.sln @@ -83,10 +79,6 @@ test_script: - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-httpclient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test c# API client (generichost) - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-generichost-netstandard2.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - # test c# API client (generichost) - - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-generichost-net6.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - # test c# API client (generichost) - - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-generichost-net6.0-nrt\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test c# API client (netcore) - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj