Files
csharp/.github/workflows/buildtest.yaml
dependabot[bot] b9042e59bd Bump microsoft/setup-msbuild from 1.2 to 1.3 (#1141)
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 1.2 to 1.3.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v1.2...v1.3)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-15 05:43:37 -08:00

77 lines
2.2 KiB
YAML

name: Build and Test
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
name: Dotnet build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
7.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
- name: Test
run: dotnet test /p:CollectCoverage=true /p:ExcludeByFile=\"**/KubernetesClient/generated/**/*.cs\" /p:CoverletOutputFormat="cobertura"
# 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@v3
with:
fetch-depth: 0
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3
- name: Setup dotnet SDK 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Restore nugets (msbuild)
run: msbuild .\src\KubernetesClient.Models\ -t:restore -p:RestorePackagesConfig=true
- name: Build (msbuild)
run: msbuild .\src\KubernetesClient.Models\
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
7.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"
if [ -s skip.log ]; then
cat skip.log
echo "CASES MUST NOT BE SKIPPED"
exit 1
fi
on:
pull_request:
types: [assigned, opened, synchronize, reopened]