Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make in CI #12194

Merged
merged 45 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
14fe081
Merge feature_flags_with_unpriveleged_user_SUITE back in ff_SUITE
lhoguin Sep 5, 2024
30a8de3
rabbit tests: Delete some temporary files to reduce log sizes
lhoguin Sep 3, 2024
645942c
make: Move dep_osiris in rabbitmq-components.mk
lhoguin Sep 10, 2024
f4f375c
Use Make in CI
lhoguin Sep 2, 2024
690b830
mqtt tests: Move web_mqtt tests out of rabbitmq_mqtt
lhoguin Sep 11, 2024
ddab3d5
mqtt tests: Move v5 web_mqtt tests out of rabbitmq_mqtt
lhoguin Sep 11, 2024
f002029
Do not open WebMQTT connection in MQTT plugin
ansd Sep 11, 2024
f4a24c7
make: Run rabbitmq_mqtt tests via parallel-ct
lhoguin Sep 11, 2024
5327ce3
make CI: Simplify test-rabbitmq-mqtt
lhoguin Sep 12, 2024
b5011f0
make CI: Simplify workflows
lhoguin Sep 12, 2024
d9770fb
make CI: Add xref job
lhoguin Sep 12, 2024
9b2d2c1
make CI: Run Dialyzer
lhoguin Sep 12, 2024
dad0bfc
make CI: Run rabbitmq_aws eunit tests
lhoguin Sep 13, 2024
97363df
make CI: Run most rabbitmq_peer_discovery_aws tests
lhoguin Sep 13, 2024
f95c870
make: Include rabbitmq_cli ebin in code path only if in deps
lhoguin Sep 16, 2024
9f8c17f
make: Fix build errors for apps that have rabbit in TEST_DEPS
lhoguin Sep 16, 2024
5e39424
amqp10_common: Don't dialyze tests or from source by default
lhoguin Sep 16, 2024
5086553
make: Correct rabbitmq_prelaunch/rabbitmq_stream_common deps
lhoguin Sep 16, 2024
85e3586
Fix OTP-27 Dialyzer errors in rabbit
lhoguin Sep 16, 2024
8619438
Fix OTP-27 Dialyzer errors in rabbit_common
lhoguin Sep 16, 2024
ec95c1a
rabbit_common: Remove 'cover' related code from 'rabbit_misc'
lhoguin Sep 16, 2024
aa43139
Fix OTP-27 Dialyzer errors in trust_store_http
lhoguin Sep 16, 2024
c0c2c2f
Fix OTP-27 Dialyzer errors in rabbitmq_trust_store
lhoguin Sep 16, 2024
5222bea
ldap auth backend: Drop support for pre-OTP-25 search results
lhoguin Sep 16, 2024
67eee56
Fix OTP-27 Dialyzer errors in rabbitmq_ct_helpers
lhoguin Sep 17, 2024
b8723d6
Fix some OTP-27 Dialyzer errors in rabbitmq_peer_discovery_etcd
lhoguin Sep 17, 2024
7fca6e9
make CI: Don't warn about missing CT log files
lhoguin Sep 17, 2024
55f0559
make CI: Disable Elixir problem matchers in tests
lhoguin Sep 17, 2024
71ec339
cli: Start a background node to run the tests
lhoguin Sep 19, 2024
1c79738
cli: Add 4.1.0 to mock plugin's versions
lhoguin Sep 19, 2024
8669b24
make CI: Run rabbitmq_cli tests
lhoguin Sep 19, 2024
beaa476
make CI: Always fetch tags
lhoguin Sep 19, 2024
a8df6f3
make CI: Set a correct broker version for CLI tests
lhoguin Sep 20, 2024
6b3b0e5
CLI: Make a test more reliable
lhoguin Sep 23, 2024
ae984cc
make: Set CT_LOGS_DIR to top-level logs/ directory
lhoguin Sep 24, 2024
4c80dde
make CI: Use strings instead of numbers for OTP/Ex versions
lhoguin Sep 24, 2024
aee0cd0
make & make CI: Small cleanups
lhoguin Sep 25, 2024
4530fb5
make: Add new CT suites and clarify check on CT_SUITES
lhoguin Sep 25, 2024
addb060
Make rabbit_global_counters:overview/0 generally available
lhoguin Sep 25, 2024
027700e
Add missing test case to web_mqtt_shared_SUITE
lhoguin Sep 25, 2024
f54e307
CT: No longer wait 3 minutes for node start
lhoguin Sep 25, 2024
a0ee6dd
Bazel fixes following renaming of test suites
lhoguin Sep 27, 2024
994abc1
Bazel CI: Fix workflow templates
lhoguin Sep 27, 2024
9fed03a
Add missing suites to non-CI parallel-ct
lhoguin Sep 30, 2024
7fe78a3
Better fix for a Dialyzer warning
lhoguin Sep 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/templates/test.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ name: Test
on:
push:
branches:
- main
#! - main
- v4.0.x
- v3.13.x
- v3.12.x
Expand All @@ -42,7 +42,7 @@ on:
- '*.bzl'
- '*.bazel'
- .github/workflows/test.yaml
pull_request:
#! pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/test-make-target.yaml
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/[email protected]
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
114 changes: 114 additions & 0 deletions .github/workflows/test-make-tests.yaml
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 }}
82 changes: 82 additions & 0 deletions .github/workflows/test-make-type-check.yaml
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 }}
84 changes: 84 additions & 0 deletions .github/workflows/test-make.yaml
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/[email protected]
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 }}
2 changes: 0 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Test
on:
push:
branches:
- main
- v4.0.x
- v3.13.x
- v3.12.x
Expand All @@ -22,7 +21,6 @@ on:
- '*.bzl'
- '*.bazel'
- .github/workflows/test.yaml
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand Down
Loading
Loading