simplify setup dotnet (#1043)

This commit is contained in:
Boshi Lian
2022-10-03 11:16:15 -07:00
committed by GitHub
parent 8888a16b58
commit d9c5c73663
4 changed files with 25 additions and 59 deletions

View File

@@ -11,18 +11,13 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup dotnet SDK 3.1 - name: Setup dotnet
uses: actions/setup-dotnet@v2 uses: actions/setup-dotnet@v2
with: with:
dotnet-version: '3.1.x' dotnet-version: |
- name: Setup dotnet SDK 5 3.1.x
uses: actions/setup-dotnet@v2 5.0.x
with: 6.0.x
dotnet-version: '5.0.x'
- name: Setup dotnet SDK 6
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
# - name: Check Format # - name: Check Format
# # don't check formatting on Windows b/c of CRLF issues. # # don't check formatting on Windows b/c of CRLF issues.
# if: matrix.os == 'ubuntu-latest' # if: matrix.os == 'ubuntu-latest'
@@ -31,11 +26,6 @@ jobs:
run: dotnet build --configuration Release -v detailed run: dotnet build --configuration Release -v detailed
- name: Test - name: Test
run: dotnet test /p:CollectCoverage=true /p:ExcludeByFile=\"**/KubernetesClient/generated/**/*.cs\" /p:CoverletOutputFormat="cobertura" run: dotnet test /p:CollectCoverage=true /p:ExcludeByFile=\"**/KubernetesClient/generated/**/*.cs\" /p:CoverletOutputFormat="cobertura"
# - uses: 5monkeys/cobertura-action@master
# with:
# path: tests/KubernetesClient.Tests/coverage.netcoreapp2.1.cobertura.xml
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# minimum_coverage: 0
# Test code gen for visual studio compatibility >> https://github.com/kubernetes-client/csharp/pull/1008 # Test code gen for visual studio compatibility >> https://github.com/kubernetes-client/csharp/pull/1008
codgen: codgen:
@@ -62,18 +52,13 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup dotnet SDK 3.1 - name: Setup dotnet
uses: actions/setup-dotnet@v2 uses: actions/setup-dotnet@v2
with: with:
dotnet-version: '3.1.x' dotnet-version: |
- name: Setup dotnet SDK 5 3.1.x
uses: actions/setup-dotnet@v2 5.0.x
with: 6.0.x
dotnet-version: '5.0.x'
- name: Setup dotnet SDK 6
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- name: Minikube - name: Minikube
run: minikube start run: minikube start
- name: Test - name: Test

View File

@@ -25,18 +25,13 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup dotnet SDK 3.1 - name: Setup dotnet
uses: actions/setup-dotnet@v2 uses: actions/setup-dotnet@v2
with: with:
dotnet-version: '3.1.x' dotnet-version: |
- name: Setup dotnet SDK 5 3.1.x
uses: actions/setup-dotnet@v2 5.0.x
with: 6.0.x
dotnet-version: '5.0.x'
- name: Setup dotnet SDK 6
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View File

@@ -14,20 +14,13 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: .NET Core 3.1.x SDK - name: Setup dotnet
uses: actions/setup-dotnet@v2 uses: actions/setup-dotnet@v2
with: with:
dotnet-version: 3.1.x dotnet-version: |
3.1.x
- name: .NET 5.x SDK 5.0.x
uses: actions/setup-dotnet@v2 6.0.x
with:
dotnet-version: 5.0.x
- name: .NET 6.x SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: dotnet restore - name: dotnet restore
run: dotnet restore --verbosity minimal --configfile nuget.config run: dotnet restore --verbosity minimal --configfile nuget.config

View File

@@ -14,20 +14,13 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: .NET Core 3.1.x SDK - name: Setup dotnet
uses: actions/setup-dotnet@v2 uses: actions/setup-dotnet@v2
with: with:
dotnet-version: 3.1.x dotnet-version: |
3.1.x
- name: .NET 5.x SDK 5.0.x
uses: actions/setup-dotnet@v2 6.0.x
with:
dotnet-version: 5.0.x
- name: .NET 6.x SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: dotnet restore - name: dotnet restore
run: dotnet restore --verbosity minimal --configfile nuget.config run: dotnet restore --verbosity minimal --configfile nuget.config