-
Notifications
You must be signed in to change notification settings - Fork 4k
154 lines (135 loc) · 3.76 KB
/
test-upgrades.yaml
File metadata and controls
154 lines (135 loc) · 3.76 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Test upgrades
on:
push:
branches:
- main
paths:
- deps/**
- scripts/**
- Makefile
- plugins.mk
- rabbitmq-components.mk
- .github/workflows/test-upgrades.yaml
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
old-dist:
name: "Build old RabbitMQ"
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup Erlant/OTP
uses: erlef/setup-beam@v1
with:
otp-version: '27' # Erlang/OTP version repeated later in this file.
elixir-version: '1.18'
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: 'v4.2.x'
fetch-tags: true
- name: Build
run: make dist
- name: Upload dist for next job
uses: pyTooling/upload-artifact@v7
with:
name: old-dist
path: .
include-hidden-files: true
if-no-files-found: error
new-dist:
name: "Build new RabbitMQ"
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup Erlant/OTP
uses: erlef/setup-beam@v1
with: # Versions repeated later in this file.
otp-version: '27'
elixir-version: '1.18'
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-tags: true
- name: Build
run: make dist
- name: Upload dist for next job
uses: pyTooling/upload-artifact@v7
with:
name: new-dist
path: .
include-hidden-files: true
if-no-files-found: error
test:
name: "Test ${{ matrix.scenario }} + ${{ matrix.node_count }} node(s)"
runs-on: ubuntu-latest
needs:
- old-dist
- new-dist
strategy:
fail-fast: false
matrix:
scenario:
- durable_queue
- transient_queue
- 10k_queues_import
- topic_bindings_import
node_count:
- 1
- 3
exclude:
# Transient queues on a single node go away during restart, there is
# no point testing this combination.
- scenario: transient_queue
node_count: 1
steps:
- name: Download old dist from previous job
uses: pyTooling/download-artifact@v8
with:
name: old-dist
path: ./OLD
- name: Download new dist from previous job
uses: pyTooling/download-artifact@v8
with:
name: new-dist
path: ./NEW
- name: Setup Erlant/OTP
uses: erlef/setup-beam@v1
with:
otp-version: '27'
elixir-version: '1.18'
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: Download omq(1)
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'rabbitmq/omq'
regex: true
file: 'omq_.*_linux_amd64'
target: bin/
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run scenario
timeout-minutes: 15
run: |
sh NEW/.github/workflows/test-upgrades.sh \
'${{ matrix.scenario }}' \
'${{ matrix.node_count }}'
- name: Upload data dirs
if: always()
uses: actions/upload-artifact@v7
with:
name: instances-data-dirs-${{ matrix.scenario }}-${{ matrix.node_count }}-nodes
path: test-instances/*
include-hidden-files: true
if-no-files-found: error