Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 55 additions & 53 deletions .github/workflows/buildtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ windows-2025t]
name: Dotnet build
steps:
- uses: actions/checkout@v4
Expand All @@ -15,14 +15,16 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
# - name: Check Format
# # don't check formatting on Windows b/c of CRLF issues.
# if: matrix.os == 'ubuntu-latest'
# run: dotnet format --severity error --verify-no-changes --exclude ./src/KubernetesClient/generated/
- name: Build
run: dotnet build --configuration Release -v detailed
run: |
kind create -n test
dotnet build --configuration Release -v detailed

- name: Test
run: dotnet test --configuration Release --collect:"Code Coverage;Format=Cobertura" --logger trx --results-directory TestResults --settings CodeCoverage.runsettings --no-build
- name: Upload coverage to Codecov
Expand All @@ -37,57 +39,57 @@ jobs:
path: ./TestResults
if: ${{ always() }} # Always run this step even on failure

# Test code gen for visual studio compatibility >> https://github.com/kubernetes-client/csharp/pull/1008
codgen:
runs-on: windows-latest
name: MSBuild build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Setup dotnet SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore nugets (msbuild)
run: msbuild .\src\KubernetesClient\ -t:restore -p:RestorePackagesConfig=true
- name: Build (msbuild)
run: msbuild .\src\KubernetesClient\
# # Test code gen for visual studio compatibility >> https://github.com/kubernetes-client/csharp/pull/1008
# codgen:
# runs-on: windows-latest
# name: MSBuild build
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Add msbuild to PATH
# uses: microsoft/setup-msbuild@v2
# - name: Setup dotnet SDK
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: '9.0.x'
# - name: Restore nugets (msbuild)
# run: msbuild .\src\KubernetesClient\ -t:restore -p:RestorePackagesConfig=true
# - name: Build (msbuild)
# run: msbuild .\src\KubernetesClient\

e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: Minikube
run: minikube start
- name: Test
run: |
true > skip.log
env K8S_E2E_MINIKUBE=1 dotnet test tests/E2E.Tests --logger "SkipTestLogger;file=$PWD/skip.log" -p:BuildInParallel=false
if [ -s skip.log ]; then
cat skip.log
echo "CASES MUST NOT BE SKIPPED"
exit 1
fi
- name: AOT Test
run: |
true > skip.log
env K8S_E2E_MINIKUBE=1 dotnet test tests/E2E.Aot.Tests --logger "SkipTestLogger;file=$PWD/skip.log" -p:BuildInParallel=false
if [ -s skip.log ]; then
cat skip.log
echo "CASES MUST NOT BE SKIPPED"
exit 1
fi
# e2e:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Setup dotnet
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: |
# 8.0.x
# 9.0.x
# - name: Minikube
# run: minikube start
# - name: Test
# run: |
# true > skip.log
# env K8S_E2E_MINIKUBE=1 dotnet test tests/E2E.Tests --logger "SkipTestLogger;file=$PWD/skip.log" -p:BuildInParallel=false
# if [ -s skip.log ]; then
# cat skip.log
# echo "CASES MUST NOT BE SKIPPED"
# exit 1
# fi
# - name: AOT Test
# run: |
# true > skip.log
# env K8S_E2E_MINIKUBE=1 dotnet test tests/E2E.Aot.Tests --logger "SkipTestLogger;file=$PWD/skip.log" -p:BuildInParallel=false
# if [ -s skip.log ]; then
# cat skip.log
# echo "CASES MUST NOT BE SKIPPED"
# exit 1
# fi

on:
pull_request:
Expand Down
Loading