-
Notifications
You must be signed in to change notification settings - Fork 13
224 lines (185 loc) · 6.07 KB
/
test.yaml
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
name: Test All Examples
on:
pull_request:
workflow_dispatch:
jobs:
find-out-changes:
runs-on: ubuntu-latest
outputs:
changed_directories: ${{ steps.set-output.outputs.changed_directories }} # The `dirs` doesn't exist in the outputs of changed-files@v35 action.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45.0.3
with:
dir_names: true
dir_names_max_depth: 1 # This is optional. If not provided, full subdirectories' paths will be provided. Use it if you need to trim the output. See docs for details: https://github.com/tj-actions/changed-files/tree/main#inputs.
dir_names_exclude_current_dir: true
exclude_submodules: true
files_ignore: |
*.md
.github/**/*
json: true
quotepath: false
- name: 'Set output in the matrix format'
id: set-output
run: echo "changed_directories={\"dir\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
testing:
if: ${{ needs.find-out-changes.outputs.changed_directories != '' }} # Without it, the strategy parser will fail if the changed_directories is empty.
strategy:
matrix: ${{fromJson(needs.find-out-changes.outputs.changed_directories)}}
fail-fast: false
needs:
- find-out-changes
uses: ./.github/workflows/reusable_test_run.yaml
with:
example-dir: ${{ matrix.dir }}
# steps:
# - uses: actions/checkout@v4
# - if: ${{ hashFiles(format('{0}/setup.sh', matrix.dir)) != '' }}
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: ${{ matrix.dir }}
# amqp-reflect:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: amqp.reflect
# asyncapi-http-kafka-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: asyncapi.http.kafka.proxy
# asyncapi-mqtt-kafka-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: asyncapi.mqtt.kafka.proxy
# asyncapi-mqtt-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: asyncapi.mqtt.proxy
# asyncapi-sse-kafka-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: asyncapi.sse.kafka.proxy
# asyncapi-sse-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: asyncapi.sse.proxy
# grpc-echo:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: grpc.echo
# grpc-kafka-echo:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: grpc.kafka.echo
# grpc-kafka-fanout:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: grpc.kafka.fanout
# grpc-kafka-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: grpc.kafka.proxy
# grpc-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: grpc.proxy
# http-filesystem:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.filesystem
# http-json-validate:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.json.validate
# http-jwt:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.jwt
# http-kafka-async:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.kafka.async
# http-kafka-avro-json:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.kafka.avro.json
# http-kafka-cache:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.kafka.cache
# http-kafka-crud:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.kafka.crud
# http-kafka-oneway:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.kafka.oneway
# http-kafka-proto-json:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.kafka.proto.json
# http-kafka-proto-oneway:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.kafka.proto.oneway
# http-kafka-sync:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.kafka.sync
# http-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: http.proxy
# mqtt-jwt:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: mqtt.jwt
# mqtt-kafka-broker:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: mqtt.kafka.broker
# openapi-asyncapi-kafka-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: openapi.asyncapi.kafka.proxy
# openapi-proxy:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: openapi.proxy
# sse-jwt:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: sse.jwt
# sse-kafka-fanout:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: sse.kafka.fanout
# tcp-echo:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: tcp.echo
# tcp-reflect:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: tcp.reflect
# tls-echo:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: tls.echo
# tls-reflect:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: tls.reflect
# ws-echo:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: ws.echo
# ws-reflect:
# uses: ./.github/workflows/reusable_test_run.yaml
# with:
# example-dir: ws.reflect