-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12194 from rabbitmq/loic-parallel-ct
Make in CI
- Loading branch information
Showing
61 changed files
with
890 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Test target (make) | ||
on: | ||
workflow_call: | ||
inputs: | ||
erlang_version: | ||
required: true | ||
type: string | ||
elixir_version: | ||
required: true | ||
type: string | ||
metadata_store: | ||
required: true | ||
type: string | ||
make_target: | ||
required: true | ||
type: string | ||
plugin: | ||
required: true | ||
type: string | ||
jobs: | ||
test: | ||
name: ${{ inputs.plugin }} (${{ inputs.make_target }}) | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: CHECKOUT REPOSITORY | ||
uses: actions/checkout@v4 | ||
|
||
- name: FETCH TAGS | ||
run: git fetch --tags | ||
|
||
- name: SETUP OTP & ELIXIR | ||
uses: erlef/setup-beam@v1.17 | ||
with: | ||
otp-version: ${{ inputs.erlang_version }} | ||
elixir-version: ${{ inputs.elixir_version }} | ||
hexpm-mirrors: | | ||
https://builds.hex.pm | ||
https://cdn.jsdelivr.net/hex | ||
# This currently only applies to Elixir; and can be safely | ||
# restricted to the build jobs to avoid duplication in output. | ||
disable_problem_matchers: true | ||
|
||
- name: SETUP DOTNET (rabbit) | ||
uses: actions/setup-dotnet@v4 | ||
if: inputs.plugin == 'rabbit' | ||
with: | ||
dotnet-version: '3.1.x' | ||
|
||
- name: SETUP SLAPD (rabbitmq_auth_backend_ldap) | ||
if: inputs.plugin == 'rabbitmq_auth_backend_ldap' | ||
run: | | ||
sudo apt-get update && \ | ||
sudo apt-get install -y \ | ||
apparmor-utils \ | ||
ldap-utils \ | ||
slapd | ||
sudo aa-complain `which slapd` | ||
- name: RUN TESTS | ||
if: inputs.plugin != 'rabbitmq_cli' | ||
run: | | ||
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }} | ||
# rabbitmq_cli needs a correct broker version for two of its tests. | ||
# But setting PROJECT_VERSION makes other plugins fail. | ||
- name: RUN TESTS (rabbitmq_cli) | ||
if: inputs.plugin == 'rabbitmq_cli' | ||
run: | | ||
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }} PROJECT_VERSION="4.1.0" | ||
- name: UPLOAD TEST LOGS | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CT logs (${{ inputs.plugin }} ${{ inputs.make_target }} OTP-${{ inputs.erlang_version }} ${{ inputs.metadata_store }}) | ||
path: | | ||
logs/ | ||
!logs/**/log_private | ||
if-no-files-found: ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: Run tests (make) | ||
on: | ||
workflow_call: | ||
inputs: | ||
erlang_version: | ||
required: true | ||
type: string | ||
elixir_version: | ||
required: true | ||
type: string | ||
metadata_store: | ||
required: true | ||
type: string | ||
jobs: | ||
test-rabbit: | ||
name: Test rabbit | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
make_target: | ||
- parallel-ct-set-1 | ||
- parallel-ct-set-2 | ||
- parallel-ct-set-3 | ||
- parallel-ct-set-4 | ||
- ct-clustering_management | ||
- eunit ct-dead_lettering | ||
- ct-feature_flags | ||
- ct-metadata_store_clustering | ||
- ct-quorum_queue | ||
- ct-rabbit_stream_queue | ||
uses: ./.github/workflows/test-make-target.yaml | ||
with: | ||
erlang_version: ${{ inputs.erlang_version }} | ||
elixir_version: ${{ inputs.elixir_version }} | ||
metadata_store: ${{ inputs.metadata_store }} | ||
make_target: ${{ matrix.make_target }} | ||
plugin: rabbit | ||
|
||
test-rabbitmq-mqtt: | ||
name: Test rabbitmq_mqtt | ||
uses: ./.github/workflows/test-make-target.yaml | ||
with: | ||
erlang_version: ${{ inputs.erlang_version }} | ||
elixir_version: ${{ inputs.elixir_version }} | ||
metadata_store: ${{ inputs.metadata_store }} | ||
make_target: parallel-ct-set-1 | ||
plugin: rabbitmq_mqtt | ||
|
||
# The integration_SUITE requires secrets and | ||
# is therefore run from a separate workflow. | ||
test-rabbitmq-peer-discovery-aws: | ||
name: Test rabbitmq_peer_discovery_aws (partially) | ||
uses: ./.github/workflows/test-make-target.yaml | ||
with: | ||
erlang_version: ${{ inputs.erlang_version }} | ||
elixir_version: ${{ inputs.elixir_version }} | ||
metadata_store: ${{ inputs.metadata_store }} | ||
make_target: ct-config_schema ct-unit | ||
plugin: rabbitmq_peer_discovery_aws | ||
|
||
test-plugin: | ||
name: Test plugins | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
plugin: | ||
- amqp10_client | ||
- amqp10_common | ||
- amqp_client | ||
- oauth2_client | ||
- rabbit_common | ||
- rabbitmq_amqp_client | ||
- rabbitmq_auth_backend_cache | ||
- rabbitmq_auth_backend_http | ||
- rabbitmq_auth_backend_ldap | ||
- rabbitmq_auth_backend_oauth2 | ||
- rabbitmq_auth_mechanism_ssl | ||
- rabbitmq_aws | ||
- rabbitmq_cli | ||
- rabbitmq_consistent_hash_exchange | ||
- rabbitmq_event_exchange | ||
- rabbitmq_federation | ||
- rabbitmq_federation_management | ||
- rabbitmq_federation_prometheus | ||
- rabbitmq_jms_topic_exchange | ||
- rabbitmq_management | ||
- rabbitmq_management_agent | ||
- rabbitmq_peer_discovery_common | ||
- rabbitmq_peer_discovery_consul | ||
- rabbitmq_peer_discovery_etcd | ||
- rabbitmq_peer_discovery_k8s | ||
- rabbitmq_prelaunch | ||
- rabbitmq_prometheus | ||
- rabbitmq_recent_history_exchange | ||
- rabbitmq_sharding | ||
- rabbitmq_shovel | ||
- rabbitmq_shovel_management | ||
- rabbitmq_shovel_prometheus | ||
- rabbitmq_stomp | ||
- rabbitmq_stream | ||
- rabbitmq_stream_common | ||
- rabbitmq_stream_management | ||
- rabbitmq_tracing | ||
- rabbitmq_trust_store | ||
- rabbitmq_web_dispatch | ||
- rabbitmq_web_mqtt | ||
- rabbitmq_web_stomp | ||
uses: ./.github/workflows/test-make-target.yaml | ||
with: | ||
erlang_version: ${{ inputs.erlang_version }} | ||
elixir_version: ${{ inputs.elixir_version }} | ||
metadata_store: ${{ inputs.metadata_store }} | ||
make_target: tests | ||
plugin: ${{ matrix.plugin }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Type check (make) | ||
on: | ||
workflow_call: | ||
inputs: | ||
erlang_version: | ||
required: true | ||
type: string | ||
elixir_version: | ||
required: true | ||
type: string | ||
jobs: | ||
type-check-plugin: | ||
name: Type check plugins | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
plugin: | ||
# These are using plugin-specific test jobs. | ||
- rabbit | ||
- rabbitmq_mqtt | ||
- rabbitmq_peer_discovery_aws | ||
# These are from the test-plugin test job. | ||
- amqp10_client | ||
- amqp10_common | ||
- amqp_client | ||
- oauth2_client | ||
- rabbit_common | ||
- rabbitmq_amqp_client | ||
- rabbitmq_auth_backend_cache | ||
- rabbitmq_auth_backend_http | ||
- rabbitmq_auth_backend_ldap | ||
- rabbitmq_auth_backend_oauth2 | ||
- rabbitmq_auth_mechanism_ssl | ||
- rabbitmq_aws | ||
- rabbitmq_consistent_hash_exchange | ||
- rabbitmq_event_exchange | ||
- rabbitmq_federation | ||
- rabbitmq_federation_management | ||
- rabbitmq_federation_prometheus | ||
- rabbitmq_jms_topic_exchange | ||
- rabbitmq_management | ||
- rabbitmq_management_agent | ||
- rabbitmq_peer_discovery_common | ||
- rabbitmq_peer_discovery_consul | ||
# @todo We are getting errors because of wrong types | ||
# in the eetcd dep. But upgrading requires using gun 2.0, | ||
# which we can't because another app's dep, emqtt, requires | ||
# gun 1.3.x. So for now we don't type check this plugin. | ||
#- rabbitmq_peer_discovery_etcd | ||
- rabbitmq_peer_discovery_k8s | ||
- rabbitmq_prelaunch | ||
- rabbitmq_prometheus | ||
- rabbitmq_recent_history_exchange | ||
- rabbitmq_sharding | ||
- rabbitmq_shovel | ||
- rabbitmq_shovel_management | ||
- rabbitmq_shovel_prometheus | ||
- rabbitmq_stomp | ||
- rabbitmq_stream | ||
- rabbitmq_stream_common | ||
- rabbitmq_stream_management | ||
- rabbitmq_tracing | ||
- rabbitmq_trust_store | ||
- rabbitmq_web_dispatch | ||
- rabbitmq_web_mqtt | ||
- rabbitmq_web_stomp | ||
# This one we do not want to run tests so no corresponding test job. | ||
- rabbitmq_ct_helpers | ||
# These do not have tests at this time so no corresponding test job. | ||
- rabbitmq_ct_client_helpers | ||
- rabbitmq_random_exchange | ||
- rabbitmq_top | ||
- rabbitmq_web_mqtt_examples | ||
- rabbitmq_web_stomp_examples | ||
- trust_store_http | ||
uses: ./.github/workflows/test-make-target.yaml | ||
with: | ||
erlang_version: ${{ inputs.erlang_version }} | ||
elixir_version: ${{ inputs.elixir_version }} | ||
metadata_store: khepri # Not actually used. | ||
make_target: dialyze | ||
plugin: ${{ matrix.plugin }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Test (make) | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- deps/** | ||
- scripts/** | ||
- Makefile | ||
- plugins.mk | ||
- rabbitmq-components.mk | ||
- .github/workflows/test-make.yaml | ||
pull_request: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build-and-xref: | ||
name: Build and Xref | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
erlang_version: | ||
- '26' | ||
- '27' | ||
elixir_version: | ||
- '1.17' | ||
# @todo Add macOS and Windows. | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: CHECKOUT REPOSITORY | ||
uses: actions/checkout@v4 | ||
|
||
- name: FETCH TAGS | ||
run: git fetch --tags | ||
|
||
- name: SETUP OTP & ELIXIR | ||
uses: erlef/setup-beam@v1.17 | ||
with: | ||
otp-version: ${{ matrix.erlang_version }} | ||
elixir-version: ${{ matrix.elixir_version }} | ||
hexpm-mirrors: | | ||
https://builds.hex.pm | ||
https://cdn.jsdelivr.net/hex | ||
- name: BUILD | ||
run: make | ||
|
||
- name: XREF | ||
run: make xref | ||
|
||
test: | ||
name: Test | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
erlang_version: | ||
- '26' | ||
- '27' | ||
elixir_version: | ||
- '1.17' | ||
metadata_store: | ||
- mnesia | ||
- khepri | ||
uses: ./.github/workflows/test-make-tests.yaml | ||
with: | ||
erlang_version: ${{ matrix.erlang_version }} | ||
elixir_version: ${{ matrix.elixir_version }} | ||
metadata_store: ${{ matrix.metadata_store }} | ||
|
||
type-check: | ||
name: Type check | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
erlang_version: # Latest OTP | ||
- '27' | ||
elixir_version: # Latest Elixir | ||
- '1.17' | ||
uses: ./.github/workflows/test-make-type-check.yaml | ||
with: | ||
erlang_version: ${{ matrix.erlang_version }} | ||
elixir_version: ${{ matrix.elixir_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.