From e45fa773bade29c37f00198c701543b6c2c122c7 Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Mon, 15 Nov 2021 19:39:25 -0800 Subject: [PATCH] add net6 targets (#745) * add net6 targets * move to net6 builtin format * e2e target * make codeql happy --- .github/workflows/buildtest.yaml | 18 ++++++++++-------- .github/workflows/codeql-analysis.yml | 13 +++++++++++++ .github/workflows/nuget.yaml | 5 +++++ src/KubernetesClient/KubernetesClient.csproj | 2 +- tests/E2E.Tests/E2E.Tests.csproj | 2 +- .../KubernetesClient.Tests.csproj | 2 +- 6 files changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/workflows/buildtest.yaml b/.github/workflows/buildtest.yaml index 30b8c82..081a106 100644 --- a/.github/workflows/buildtest.yaml +++ b/.github/workflows/buildtest.yaml @@ -11,10 +11,6 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Setup dotnet SDK 2.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '2.1.x' - name: Setup dotnet SDK 3.1 uses: actions/setup-dotnet@v1 with: @@ -23,12 +19,14 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: '5.0.x' - - name: Setup Format - run: dotnet tool install -g dotnet-format + - name: Setup dotnet SDK 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Check Format # don't check formatting on Windows b/c of CRLF issues. - if: matrix.os != 'windows-latest' - run: dotnet format --check --exclude ./src/KubernetesClient/generated/ + if: matrix.os == 'ubuntu-latest' + run: dotnet format --severity error --verify-no-changes --exclude ./src/KubernetesClient/generated/ - name: Build run: dotnet build --configuration Release - name: Test @@ -52,6 +50,10 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: '5.0.x' + - name: Setup dotnet SDK 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Minikube run: minikube start - name: Test diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 541d141..4ae4d4e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,6 +25,19 @@ jobs: with: fetch-depth: 0 + - name: Setup dotnet SDK 3.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + - name: Setup dotnet SDK 5 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.x' + - name: Setup dotnet SDK 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1 diff --git a/.github/workflows/nuget.yaml b/.github/workflows/nuget.yaml index fc9b5a6..5808d47 100644 --- a/.github/workflows/nuget.yaml +++ b/.github/workflows/nuget.yaml @@ -24,6 +24,11 @@ jobs: with: dotnet-version: 5.0.x + - name: .NET 6.x SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + - name: dotnet restore run: dotnet restore --verbosity minimal --configfile nuget.config diff --git a/src/KubernetesClient/KubernetesClient.csproj b/src/KubernetesClient/KubernetesClient.csproj index 7035d0f..d002b89 100644 --- a/src/KubernetesClient/KubernetesClient.csproj +++ b/src/KubernetesClient/KubernetesClient.csproj @@ -10,7 +10,7 @@ https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.png kubernetes;docker;containers; - netstandard2.1;net5.0 + netstandard2.1;net5;net6 k8s true true diff --git a/tests/E2E.Tests/E2E.Tests.csproj b/tests/E2E.Tests/E2E.Tests.csproj index 11e1f0b..b9c6f2b 100644 --- a/tests/E2E.Tests/E2E.Tests.csproj +++ b/tests/E2E.Tests/E2E.Tests.csproj @@ -3,7 +3,7 @@ false true k8s.E2E - net5.0;netcoreapp3.1 + netcoreapp3.1;net5;net6 diff --git a/tests/KubernetesClient.Tests/KubernetesClient.Tests.csproj b/tests/KubernetesClient.Tests/KubernetesClient.Tests.csproj index 6f97a01..47e09fd 100755 --- a/tests/KubernetesClient.Tests/KubernetesClient.Tests.csproj +++ b/tests/KubernetesClient.Tests/KubernetesClient.Tests.csproj @@ -4,7 +4,7 @@ 8 true k8s.Tests - net5;netcoreapp3.1 + netcoreapp3.1;net5;net6