Skip to content

Commit c8de0ca

Browse files
authored
Introduce githuh action (#364)
* gh build and test * fix dotnet env * fix DisposeWatch test fickle * mini 0?? * nuget push from gh
1 parent 7749ae0 commit c8de0ca

File tree

3 files changed

+50
-20
lines changed

3 files changed

+50
-20
lines changed

.github/workflows/dotnet.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: .NET Core
2+
3+
jobs:
4+
build:
5+
runs-on: ${{ matrix.os }}
6+
strategy:
7+
matrix:
8+
os: [ubuntu-latest, windows-latest, macOS-latest]
9+
name: Dotnet build
10+
steps:
11+
- uses: actions/checkout@master
12+
with:
13+
fetch-depth: 0
14+
- name: Setup dotnet
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: 2.2.108
18+
- run: dotnet build --configuration Release
19+
- name: test with dotnet
20+
run: dotnet test /p:CollectCoverage=true /p:Exclude="[KubernetesClient]k8s.Models.*" /p:Exclude="[KubernetesClient]k8s.Internal.*" /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura"
21+
- uses: 5monkeys/cobertura-action@master
22+
with:
23+
path: tests/KubernetesClient.Tests/coverage.netcoreapp2.1.cobertura.xml
24+
repo_token: ${{ secrets.GITHUB_TOKEN }}
25+
minimum_coverage: 0
26+
27+
on:
28+
pull_request:
29+
types: [assigned, opened, synchronize, reopened]

.github/workflows/nuget.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Nuget
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: windows-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Setup .NET Core
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: 2.2.108
18+
- name: pack
19+
run: dotnet pack --configuration Release src/KubernetesClient -o pkg
20+
- name: push
21+
run: dotnet nuget push pkg\*.nupkg -s https://www.nuget.org/ -k ${{ secrets.nuget_api_key }}

.github/workflows/test.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)