Introduce githuh action (#364)
* gh build and test * fix dotnet env * fix DisposeWatch test fickle * mini 0?? * nuget push from gh
This commit is contained in:
29
.github/workflows/dotnet.yaml
vendored
Normal file
29
.github/workflows/dotnet.yaml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: .NET Core
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
name: Dotnet build
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 2.2.108
|
||||
- run: dotnet build --configuration Release
|
||||
- name: test with dotnet
|
||||
run: dotnet test /p:CollectCoverage=true /p:Exclude="[KubernetesClient]k8s.Models.*" /p:Exclude="[KubernetesClient]k8s.Internal.*" /p:CollectCoverage=true /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
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, opened, synchronize, reopened]
|
||||
21
.github/workflows/nuget.yaml
vendored
Normal file
21
.github/workflows/nuget.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Nuget
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 2.2.108
|
||||
- name: pack
|
||||
run: dotnet pack --configuration Release src/KubernetesClient -o pkg
|
||||
- name: push
|
||||
run: dotnet nuget push pkg\*.nupkg -s https://www.nuget.org/ -k ${{ secrets.nuget_api_key }}
|
||||
20
.github/workflows/test.yaml
vendored
20
.github/workflows/test.yaml
vendored
@@ -1,20 +0,0 @@
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
dotnet: [ '2.2.103', '3.0.100' ]
|
||||
name: Dotnet ${{ matrix.dotnet }} sample
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: ${{ matrix.dotnet }}
|
||||
- run: dotnet build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, opened, synchronize, reopened]
|
||||
Reference in New Issue
Block a user