-
-
Notifications
You must be signed in to change notification settings - Fork 65
51 lines (45 loc) · 1.18 KB
/
dotnet-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: .NET Testing
on:
pull_request:
branches:
- "**"
jobs:
test:
name: Execute Test ${{ matrix.project }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- project: KubeOps.KubernetesClient.Test
kubernetes: true
- project: KubeOps.Test
kubernetes: false
- project: KubeOps.Templates.Test
kubernetes: false
- project: KubeOps.TestOperator.Test
kubernetes: false
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
- name: Create Kubernetes Cluster
uses: helm/[email protected]
if: ${{ matrix.kubernetes == true }}
- name: Execute Tests
run: dotnet test --configuration Release tests/${{ matrix.project }}
result:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [test]
steps:
- run: |
result="${{ needs.test.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi