-
Notifications
You must be signed in to change notification settings - Fork 36
315 lines (264 loc) · 7.33 KB
/
ci.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
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
name: CI
on:
pull_request:
paths:
- Makefile
- 'src/**'
- 'spec/**'
- 'shard.*'
- 'static/**'
- 'views/**'
- '.github/workflows/ci.yml'
- 'build/build_docs_in_ci'
- 'openapi/**'
push:
branches:
- main
paths:
- Makefile
- 'src/**'
- 'spec/**'
- 'shard.*'
- 'static/**'
- 'views/**'
- '.github/workflows/ci.yml'
- 'build/build_docs_in_ci'
- 'openapi/**'
jobs:
format:
name: Format check
runs-on: ubuntu-latest
continue-on-error: true
container: 84codes/crystal:latest-ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: crystal tool format --check
lint:
name: Lint check
runs-on: ubuntu-latest
continue-on-error: true
container: 84codes/crystal:latest-ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Checkout ameba
uses: actions/checkout@v3
with:
repository: crystal-ameba/ameba
path: ameba
- name: Build ameba
run: make -C ameba
- name: Run ameba
run: ameba/bin/ameba
js-lint:
name: Lint javascript
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: latest
- name: Setup node
run: npm install -g standard
- name: Run standard
run: standard static/js
api-lint:
name: Lint and build HTTP API documentation
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Lint and build HTTP API documentation
run: make docs
spec:
name: Spec
runs-on: ubuntu-latest
container: 84codes/crystal:latest-ubuntu-20.04
steps:
- name: Print Crystal version
run: crystal -v
- name: Install dependencies
run: apt-get update && apt-get install -y liblz4-dev
- name: Checkout
uses: actions/checkout@v3
- name: Spec
run: make test
spec_osx:
name: Spec OS X
runs-on: macos-13
steps:
- name: Install Crystal
run: brew install crystal
env:
HOMEBREW_NO_AUTO_UPDATE: 0
- run: crystal --version
- uses: actions/checkout@v3
- name: Spec
run: make test
compile:
name: Compile LavinMQ
runs-on: ubuntu-latest
container: 84codes/crystal:latest-ubuntu-20.04
steps:
- name: Install dependencies
run: apt-get update && apt-get install -y liblz4-dev
- name: Checkout
uses: actions/checkout@v3
- name: Build lavinmq
run: make -j bin/lavinmq bin/lavinmqctl DOCS= CRYSTAL_FLAGS=-Dbake_static
- name: Print build info
run: bin/lavinmq --build-info
- name: Upload bin/
uses: actions/upload-artifact@v3
with:
name: bin
path: bin/
java-client-test:
name: RabbitMQ java client test
runs-on: ubuntu-20.04
needs: compile
continue-on-error: true
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make libevent-2.1-7 openjdk-13-jre-headless liblz4-1
- uses: actions/download-artifact@v3
with:
name: bin
path: bin
- name: Run LavinMQ in background
run: |
chmod +x bin/*
bin/lavinmq --data-dir=/tmp/amqp --bind=:: &
- name: Clone java client
uses: actions/checkout@v3
with:
repository: cloudamqp/rabbitmq-java-client
ref: lavinmq-compatible-tests
path: rabbitmq-java-client
- name: Run java tests (allowed to fail)
id: test
run: |
cd rabbitmq-java-client
make deps
./mvnw -q verify -P '!setup-test-cluster' -Dit.test=FunctionalTestSuite -Drabbitmqctl.bin=../bin/lavinmqctl
bunny-test:
name: Bunny client test
runs-on: ubuntu-20.04
needs: compile
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libevent-dev liblz4-1
- name: Checkout LavinMQ for bunny_definitions.json
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: bin
path: bin
- name: Run LavinMQ in background
run: |
chmod +x bin/lavinmq
bin/lavinmq --data-dir /tmp/amqp &
- name: Import definitions
run: |
chmod +x bin/lavinmqctl
bin/lavinmqctl import_definitions .github/bunny_definitions.json
- name: Clone Bunny
uses: actions/checkout@v3
with:
repository: ruby-amqp/bunny
path: bunny
fetch-depth: 0
ref: "2.17.0"
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
working-directory: bunny
ruby-version: 2.7.2
bundler-cache: true
- name: Run specs
run: |
cd bunny
bundle exec rspec \
--pattern "spec/*/integration/*_spec.rb, spec/issues/*_spec.rb" \
--exclude-pattern "**/*/tls_*, **/*/connection_recovery_*"
ruby-http-api-test:
name: RabbitMQ HTTP API Ruby client test
runs-on: ubuntu-20.04
needs: compile
continue-on-error: true
steps:
- uses: actions/download-artifact@v3
with:
name: bin
path: bin
- name: Run LavinMQ in background
run: |
chmod +x bin/lavinmq
bin/lavinmq --data-dir /tmp/amqp &
- name: Clone HTTP API client
uses: actions/checkout@v3
with:
repository: cloudamqp/rabbitmq_http_api_client
token: ${{ secrets.PRIVATE_REPO_ACCESS }}
path: rabbitmq_http_api_client
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
working-directory: rabbitmq_http_api_client
ruby-version: 2.7.1
bundler-cache: true
- name: Run specs
run: |
cd rabbitmq_http_api_client
bundle exec rspec
go-http-api-test:
name: RabbitMQ HTTP API Go client test
runs-on: ubuntu-20.04
needs: compile
continue-on-error: true
steps:
- uses: actions/download-artifact@v3
with:
name: bin
path: bin
- name: Run LavinMQ in background
run: |
chmod +x bin/lavinmq
bin/lavinmq --data-dir /tmp/amqp &
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.15.2
- name: Clone http client
uses: actions/checkout@v3
with:
repository: cloudamqp/rabbit-hole
token: ${{ secrets.PRIVATE_REPO_ACCESS }}
path: rabbit-hole
- name: Run specs
run: |
cd rabbit-hole
go test -v ./...
release-mode-test:
name: Test in release mode
runs-on: ubuntu-20.04
needs: compile
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: bin
path: bin
- name: Run LavinMQ in background
run: |
chmod +x bin/lavinmq
bin/lavinmq --data-dir /tmp/amqp &
- name: Test the static HTTP controller
run: ./extras/static_requests.sh