-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (101 loc) · 3.67 KB
/
testing.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Test
on:
push:
branches:
- '**'
- '!master'
env:
unit_test_project: "tests/EnterpriseIntegration.Tests"
integration_test_project: "tests/EnterpriseIntegration.IntegrationTests"
rabbitmq_test_project: "tests/EnterpriseIntegration.RabbitMQ.Tests"
kafka_test_project: "tests/EnterpriseIntegration.Kafka.Tests"
latest_dotnet_version: "7.x"
jobs:
unit_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET Core SDK ${{ env.latest_dotnet_version }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.latest_dotnet_version }}
- name: Install dependencies
run: dotnet restore $unit_test_project
- name: Build
run: dotnet build $unit_test_project --no-restore --configuration Release
- name: Test
run: dotnet test $unit_test_project --no-restore --logger:trx --results-directory "TestResults"
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: dotnet-results
path: "TestResults"
if: ${{ always() }}
integration_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET Core SDK ${{ env.latest_dotnet_version }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.latest_dotnet_version }}
- name: Install dependencies
run: dotnet restore $integration_test_project
- name: Build
run: dotnet build $integration_test_project --no-restore --configuration Release
- name: Test
run: dotnet test $integration_test_project --no-restore --logger:trx --results-directory "TestResults"
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: dotnet-results
path: "TestResults"
if: ${{ always() }}
rabbitmq_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET Core SDK ${{ env.latest_dotnet_version }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.latest_dotnet_version }}
- name: Install dependencies
run: dotnet restore $rabbitmq_test_project
- name: Build
run: dotnet build $rabbitmq_test_project --no-restore --configuration Release
- name: Test
run: dotnet test $rabbitmq_test_project --no-restore --logger:trx --results-directory "TestResults"
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: dotnet-results
path: "TestResults"
if: ${{ always() }}
kafka_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup .NET Core SDK ${{ env.latest_dotnet_version }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.latest_dotnet_version }}
- name: Install dependencies
run: dotnet restore $kafka_test_project
- name: Build
run: dotnet build $kafka_test_project --no-restore --configuration Release
- name: Test
run: dotnet test $kafka_test_project --no-restore --logger:trx --results-directory "TestResults"
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: dotnet-results
path: "TestResults"
if: ${{ always() }}