-
-
Notifications
You must be signed in to change notification settings - Fork 97
140 lines (136 loc) · 5.53 KB
/
Copy pathpull-request.yml
File metadata and controls
140 lines (136 loc) · 5.53 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: "PR Build and test"
on:
workflow_dispatch:
pull_request:
paths-ignore:
- docs/**
- '*.md'
concurrency:
group: pr-build-and-test-${{ github.ref }}
cancel-in-progress: true
jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v7
with:
name: Event File
path: ${{ github.event_path }}
unit-tests:
# Container-less test projects. Run across all target frameworks — these exercise the
# library code paths, so multi-TFM coverage matters here. No Docker needed.
name: "Build and test core (${{ matrix.dotnet-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dotnet-version: [ '8.0', '9.0', '10.0' ]
steps:
-
name: Checkout
uses: actions/checkout@v7
-
name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
-
name: Run tests
run: |
set -euo pipefail
projects="
src/Core/test/Eventuous.Tests/Eventuous.Tests.csproj
src/Core/test/Eventuous.Tests.Application/Eventuous.Tests.Application.csproj
src/Core/test/Eventuous.Tests.Subscriptions/Eventuous.Tests.Subscriptions.csproj
src/Core/test/Eventuous.Tests.Shared.Analyzers/Eventuous.Tests.Shared.Analyzers.csproj
src/Extensions/test/Eventuous.Tests.DependencyInjection/Eventuous.Tests.DependencyInjection.csproj
src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/Eventuous.Tests.Extensions.AspNetCore.csproj
src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore.Analyzers/Eventuous.Tests.Extensions.AspNetCore.Analyzers.csproj
src/Gateway/test/Eventuous.Tests.Gateway/Eventuous.Tests.Gateway.csproj
src/Experimental/test/Eventuous.Tests.Spyglass/Eventuous.Tests.Spyglass.csproj
src/Experimental/test/Eventuous.Tests.Spyglass.Generators/Eventuous.Tests.Spyglass.Generators.csproj
src/Sqlite/test/Eventuous.Tests.Sqlite/Eventuous.Tests.Sqlite.csproj
src/SignalR/test/Eventuous.Tests.SignalR/Eventuous.Tests.SignalR.csproj
"
for proj in $projects; do
echo "::group::dotnet test $proj (net${{ matrix.dotnet-version }})"
dotnet test "$proj" -c "Debug CI" -f net${{ matrix.dotnet-version }}
echo "::endgroup::"
done
-
name: Upload Test Results
if: always()
uses: actions/upload-artifact@v7
with:
name: Test Results core ${{ matrix.dotnet-version }}
path: |
test-results/**/*.xml
test-results/**/*.trx
test-results/**/*.json
integration-tests:
# One job per provider so a single runner only ever starts one container family — running
# the whole solution on one runner stacked KurrentDB + Postgres + SQL Server + Mongo + Kafka
# + RabbitMQ containers at once and made container startup (and the tests) flaky.
#
# Integration suites run on a single TFM: the DB adapter behaves the same across runtimes, so
# multi-TFM runs mostly re-pull the same images for little extra signal. max-parallel throttles
# concurrent Docker Hub image pulls to stay under the pull rate limit.
#
# When adding a new integration test project (one that uses Testcontainers), add a suite entry.
name: "Build and test ${{ matrix.suite.name }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
suite:
- name: kurrentdb
project: src/KurrentDB/test/Eventuous.Tests.KurrentDB/Eventuous.Tests.KurrentDB.csproj
- name: postgres
project: src/Postgres/test/Eventuous.Tests.Postgres/Eventuous.Tests.Postgres.csproj
- name: sqlserver
project: src/SqlServer/test/Eventuous.Tests.SqlServer/Eventuous.Tests.SqlServer.csproj
- name: mongo
project: src/Mongo/test/Eventuous.Tests.Projections.MongoDB/Eventuous.Tests.Projections.MongoDB.csproj
- name: kafka
project: src/Kafka/test/Eventuous.Tests.Kafka/Eventuous.Tests.Kafka.csproj
- name: rabbitmq
project: src/RabbitMq/test/Eventuous.Tests.RabbitMq/Eventuous.Tests.RabbitMq.csproj
- name: redis
project: src/Redis/test/Eventuous.Tests.Redis/Eventuous.Tests.Redis.csproj
- name: azure-servicebus
project: src/Azure/test/Eventuous.Tests.Azure.ServiceBus/Eventuous.Tests.Azure.ServiceBus.csproj
- name: googlepubsub
project: src/GooglePubSub/test/Eventuous.Tests.GooglePubSub/Eventuous.Tests.GooglePubSub.csproj
- name: signalr-integration
project: src/SignalR/test/Eventuous.Tests.SignalR.Integration/Eventuous.Tests.SignalR.Integration.csproj
steps:
-
name: Checkout
uses: actions/checkout@v7
-
name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
-
name: Run tests
run: dotnet test "${{ matrix.suite.project }}" -c "Debug CI" -f net10.0
-
name: Upload Test Results
if: always()
uses: actions/upload-artifact@v7
with:
name: Test Results ${{ matrix.suite.name }}
path: |
test-results/**/*.xml
test-results/**/*.trx
test-results/**/*.json