Skip to content

Commit 297981e

Browse files
authored
Merge pull request #12194 from rabbitmq/loic-parallel-ct
Make in CI
2 parents 36a84f4 + 7fe78a3 commit 297981e

File tree

61 files changed

+890
-338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+890
-338
lines changed

.github/workflows/templates/test.template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ name: Test
2222
on:
2323
push:
2424
branches:
25-
- main
25+
#! - main
2626
- v4.0.x
2727
- v3.13.x
2828
- v3.12.x
@@ -42,7 +42,7 @@ on:
4242
- '*.bzl'
4343
- '*.bazel'
4444
- .github/workflows/test.yaml
45-
pull_request:
45+
#! pull_request:
4646
concurrency:
4747
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
4848
cancel-in-progress: true
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Test target (make)
2+
on:
3+
workflow_call:
4+
inputs:
5+
erlang_version:
6+
required: true
7+
type: string
8+
elixir_version:
9+
required: true
10+
type: string
11+
metadata_store:
12+
required: true
13+
type: string
14+
make_target:
15+
required: true
16+
type: string
17+
plugin:
18+
required: true
19+
type: string
20+
jobs:
21+
test:
22+
name: ${{ inputs.plugin }} (${{ inputs.make_target }})
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 30
25+
steps:
26+
- name: CHECKOUT REPOSITORY
27+
uses: actions/checkout@v4
28+
29+
- name: FETCH TAGS
30+
run: git fetch --tags
31+
32+
- name: SETUP OTP & ELIXIR
33+
uses: erlef/[email protected]
34+
with:
35+
otp-version: ${{ inputs.erlang_version }}
36+
elixir-version: ${{ inputs.elixir_version }}
37+
hexpm-mirrors: |
38+
https://builds.hex.pm
39+
https://cdn.jsdelivr.net/hex
40+
# This currently only applies to Elixir; and can be safely
41+
# restricted to the build jobs to avoid duplication in output.
42+
disable_problem_matchers: true
43+
44+
- name: SETUP DOTNET (rabbit)
45+
uses: actions/setup-dotnet@v4
46+
if: inputs.plugin == 'rabbit'
47+
with:
48+
dotnet-version: '3.1.x'
49+
50+
- name: SETUP SLAPD (rabbitmq_auth_backend_ldap)
51+
if: inputs.plugin == 'rabbitmq_auth_backend_ldap'
52+
run: |
53+
sudo apt-get update && \
54+
sudo apt-get install -y \
55+
apparmor-utils \
56+
ldap-utils \
57+
slapd
58+
59+
sudo aa-complain `which slapd`
60+
61+
- name: RUN TESTS
62+
if: inputs.plugin != 'rabbitmq_cli'
63+
run: |
64+
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }}
65+
66+
# rabbitmq_cli needs a correct broker version for two of its tests.
67+
# But setting PROJECT_VERSION makes other plugins fail.
68+
- name: RUN TESTS (rabbitmq_cli)
69+
if: inputs.plugin == 'rabbitmq_cli'
70+
run: |
71+
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }} PROJECT_VERSION="4.1.0"
72+
73+
- name: UPLOAD TEST LOGS
74+
if: always()
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: CT logs (${{ inputs.plugin }} ${{ inputs.make_target }} OTP-${{ inputs.erlang_version }} ${{ inputs.metadata_store }})
78+
path: |
79+
logs/
80+
!logs/**/log_private
81+
if-no-files-found: ignore
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Run tests (make)
2+
on:
3+
workflow_call:
4+
inputs:
5+
erlang_version:
6+
required: true
7+
type: string
8+
elixir_version:
9+
required: true
10+
type: string
11+
metadata_store:
12+
required: true
13+
type: string
14+
jobs:
15+
test-rabbit:
16+
name: Test rabbit
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
make_target:
21+
- parallel-ct-set-1
22+
- parallel-ct-set-2
23+
- parallel-ct-set-3
24+
- parallel-ct-set-4
25+
- ct-clustering_management
26+
- eunit ct-dead_lettering
27+
- ct-feature_flags
28+
- ct-metadata_store_clustering
29+
- ct-quorum_queue
30+
- ct-rabbit_stream_queue
31+
uses: ./.github/workflows/test-make-target.yaml
32+
with:
33+
erlang_version: ${{ inputs.erlang_version }}
34+
elixir_version: ${{ inputs.elixir_version }}
35+
metadata_store: ${{ inputs.metadata_store }}
36+
make_target: ${{ matrix.make_target }}
37+
plugin: rabbit
38+
39+
test-rabbitmq-mqtt:
40+
name: Test rabbitmq_mqtt
41+
uses: ./.github/workflows/test-make-target.yaml
42+
with:
43+
erlang_version: ${{ inputs.erlang_version }}
44+
elixir_version: ${{ inputs.elixir_version }}
45+
metadata_store: ${{ inputs.metadata_store }}
46+
make_target: parallel-ct-set-1
47+
plugin: rabbitmq_mqtt
48+
49+
# The integration_SUITE requires secrets and
50+
# is therefore run from a separate workflow.
51+
test-rabbitmq-peer-discovery-aws:
52+
name: Test rabbitmq_peer_discovery_aws (partially)
53+
uses: ./.github/workflows/test-make-target.yaml
54+
with:
55+
erlang_version: ${{ inputs.erlang_version }}
56+
elixir_version: ${{ inputs.elixir_version }}
57+
metadata_store: ${{ inputs.metadata_store }}
58+
make_target: ct-config_schema ct-unit
59+
plugin: rabbitmq_peer_discovery_aws
60+
61+
test-plugin:
62+
name: Test plugins
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
plugin:
67+
- amqp10_client
68+
- amqp10_common
69+
- amqp_client
70+
- oauth2_client
71+
- rabbit_common
72+
- rabbitmq_amqp_client
73+
- rabbitmq_auth_backend_cache
74+
- rabbitmq_auth_backend_http
75+
- rabbitmq_auth_backend_ldap
76+
- rabbitmq_auth_backend_oauth2
77+
- rabbitmq_auth_mechanism_ssl
78+
- rabbitmq_aws
79+
- rabbitmq_cli
80+
- rabbitmq_consistent_hash_exchange
81+
- rabbitmq_event_exchange
82+
- rabbitmq_federation
83+
- rabbitmq_federation_management
84+
- rabbitmq_federation_prometheus
85+
- rabbitmq_jms_topic_exchange
86+
- rabbitmq_management
87+
- rabbitmq_management_agent
88+
- rabbitmq_peer_discovery_common
89+
- rabbitmq_peer_discovery_consul
90+
- rabbitmq_peer_discovery_etcd
91+
- rabbitmq_peer_discovery_k8s
92+
- rabbitmq_prelaunch
93+
- rabbitmq_prometheus
94+
- rabbitmq_recent_history_exchange
95+
- rabbitmq_sharding
96+
- rabbitmq_shovel
97+
- rabbitmq_shovel_management
98+
- rabbitmq_shovel_prometheus
99+
- rabbitmq_stomp
100+
- rabbitmq_stream
101+
- rabbitmq_stream_common
102+
- rabbitmq_stream_management
103+
- rabbitmq_tracing
104+
- rabbitmq_trust_store
105+
- rabbitmq_web_dispatch
106+
- rabbitmq_web_mqtt
107+
- rabbitmq_web_stomp
108+
uses: ./.github/workflows/test-make-target.yaml
109+
with:
110+
erlang_version: ${{ inputs.erlang_version }}
111+
elixir_version: ${{ inputs.elixir_version }}
112+
metadata_store: ${{ inputs.metadata_store }}
113+
make_target: tests
114+
plugin: ${{ matrix.plugin }}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Type check (make)
2+
on:
3+
workflow_call:
4+
inputs:
5+
erlang_version:
6+
required: true
7+
type: string
8+
elixir_version:
9+
required: true
10+
type: string
11+
jobs:
12+
type-check-plugin:
13+
name: Type check plugins
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
plugin:
18+
# These are using plugin-specific test jobs.
19+
- rabbit
20+
- rabbitmq_mqtt
21+
- rabbitmq_peer_discovery_aws
22+
# These are from the test-plugin test job.
23+
- amqp10_client
24+
- amqp10_common
25+
- amqp_client
26+
- oauth2_client
27+
- rabbit_common
28+
- rabbitmq_amqp_client
29+
- rabbitmq_auth_backend_cache
30+
- rabbitmq_auth_backend_http
31+
- rabbitmq_auth_backend_ldap
32+
- rabbitmq_auth_backend_oauth2
33+
- rabbitmq_auth_mechanism_ssl
34+
- rabbitmq_aws
35+
- rabbitmq_consistent_hash_exchange
36+
- rabbitmq_event_exchange
37+
- rabbitmq_federation
38+
- rabbitmq_federation_management
39+
- rabbitmq_federation_prometheus
40+
- rabbitmq_jms_topic_exchange
41+
- rabbitmq_management
42+
- rabbitmq_management_agent
43+
- rabbitmq_peer_discovery_common
44+
- rabbitmq_peer_discovery_consul
45+
# @todo We are getting errors because of wrong types
46+
# in the eetcd dep. But upgrading requires using gun 2.0,
47+
# which we can't because another app's dep, emqtt, requires
48+
# gun 1.3.x. So for now we don't type check this plugin.
49+
#- rabbitmq_peer_discovery_etcd
50+
- rabbitmq_peer_discovery_k8s
51+
- rabbitmq_prelaunch
52+
- rabbitmq_prometheus
53+
- rabbitmq_recent_history_exchange
54+
- rabbitmq_sharding
55+
- rabbitmq_shovel
56+
- rabbitmq_shovel_management
57+
- rabbitmq_shovel_prometheus
58+
- rabbitmq_stomp
59+
- rabbitmq_stream
60+
- rabbitmq_stream_common
61+
- rabbitmq_stream_management
62+
- rabbitmq_tracing
63+
- rabbitmq_trust_store
64+
- rabbitmq_web_dispatch
65+
- rabbitmq_web_mqtt
66+
- rabbitmq_web_stomp
67+
# This one we do not want to run tests so no corresponding test job.
68+
- rabbitmq_ct_helpers
69+
# These do not have tests at this time so no corresponding test job.
70+
- rabbitmq_ct_client_helpers
71+
- rabbitmq_random_exchange
72+
- rabbitmq_top
73+
- rabbitmq_web_mqtt_examples
74+
- rabbitmq_web_stomp_examples
75+
- trust_store_http
76+
uses: ./.github/workflows/test-make-target.yaml
77+
with:
78+
erlang_version: ${{ inputs.erlang_version }}
79+
elixir_version: ${{ inputs.elixir_version }}
80+
metadata_store: khepri # Not actually used.
81+
make_target: dialyze
82+
plugin: ${{ matrix.plugin }}

.github/workflows/test-make.yaml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Test (make)
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- deps/**
8+
- scripts/**
9+
- Makefile
10+
- plugins.mk
11+
- rabbitmq-components.mk
12+
- .github/workflows/test-make.yaml
13+
pull_request:
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
jobs:
18+
build-and-xref:
19+
name: Build and Xref
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
erlang_version:
24+
- '26'
25+
- '27'
26+
elixir_version:
27+
- '1.17'
28+
# @todo Add macOS and Windows.
29+
runs-on: ubuntu-latest
30+
timeout-minutes: 30
31+
steps:
32+
- name: CHECKOUT REPOSITORY
33+
uses: actions/checkout@v4
34+
35+
- name: FETCH TAGS
36+
run: git fetch --tags
37+
38+
- name: SETUP OTP & ELIXIR
39+
uses: erlef/[email protected]
40+
with:
41+
otp-version: ${{ matrix.erlang_version }}
42+
elixir-version: ${{ matrix.elixir_version }}
43+
hexpm-mirrors: |
44+
https://builds.hex.pm
45+
https://cdn.jsdelivr.net/hex
46+
47+
- name: BUILD
48+
run: make
49+
50+
- name: XREF
51+
run: make xref
52+
53+
test:
54+
name: Test
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
erlang_version:
59+
- '26'
60+
- '27'
61+
elixir_version:
62+
- '1.17'
63+
metadata_store:
64+
- mnesia
65+
- khepri
66+
uses: ./.github/workflows/test-make-tests.yaml
67+
with:
68+
erlang_version: ${{ matrix.erlang_version }}
69+
elixir_version: ${{ matrix.elixir_version }}
70+
metadata_store: ${{ matrix.metadata_store }}
71+
72+
type-check:
73+
name: Type check
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
erlang_version: # Latest OTP
78+
- '27'
79+
elixir_version: # Latest Elixir
80+
- '1.17'
81+
uses: ./.github/workflows/test-make-type-check.yaml
82+
with:
83+
erlang_version: ${{ matrix.erlang_version }}
84+
elixir_version: ${{ matrix.elixir_version }}

.github/workflows/test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Test
22
on:
33
push:
44
branches:
5-
- main
65
- v4.0.x
76
- v3.13.x
87
- v3.12.x
@@ -22,7 +21,6 @@ on:
2221
- '*.bzl'
2322
- '*.bazel'
2423
- .github/workflows/test.yaml
25-
pull_request:
2624
concurrency:
2725
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2826
cancel-in-progress: true

0 commit comments

Comments
 (0)