web_mqtt_shared_SUITE: propagate flow_classic_queue to mqtt_shared_SU… #1
Workflow file for this run
This file contains hidden or 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
| name: Test Plugin Mixed Version Clusters | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| repo_cache_key: | ||
| required: true | ||
| type: string | ||
| plugin: | ||
| required: true | ||
| type: string | ||
| shard_index: | ||
| default: 0 | ||
| type: number | ||
| shard_count: | ||
| default: 1 | ||
| type: number | ||
| secrets: | ||
| REMOTE_CACHE_BUCKET_NAME_MIXED: | ||
| required: true | ||
| REMOTE_CACHE_CREDENTIALS_JSON: | ||
| required: true | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| erlang_version: | ||
| - 26 | ||
| metadata_store: | ||
| - mnesia | ||
| <<<<<<< HEAD | ||
| # Khepri is currently skipped because Khepri is an unstable feature: we don't guarantee upgrability. | ||
| # Mixed-version tests currently fail with Khepri because of a new machine version introduced in | ||
| # Khepri v0.14.0. | ||
| # - khepri | ||
| ======= | ||
| - khepri | ||
| >>>>>>> f3540ee7d2 (web_mqtt_shared_SUITE: propagate flow_classic_queue to mqtt_shared_SUITE #12907 12906) | ||
| include: | ||
| - erlang_version: 26 | ||
| elixir_version: 1.17 | ||
| timeout-minutes: 120 | ||
| steps: | ||
| - name: LOAD REPO CACHE | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| key: ${{ inputs.repo_cache_key }} | ||
| path: /home/runner/repo-cache/ | ||
| - name: CHECKOUT REPOSITORY | ||
| uses: actions/checkout@v4 | ||
| - name: CONFIGURE 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: AUTHENTICATE TO GOOGLE CLOUD | ||
| uses: google-github-actions/[email protected] | ||
| with: | ||
| credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }} | ||
| - name: CONFIGURE BAZEL | ||
| run: | | ||
| if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME_MIXED }}" ]; then | ||
| cat << EOF >> user.bazelrc | ||
| build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME_MIXED }} | ||
| build --google_default_credentials | ||
| build --experimental_guard_against_concurrent_changes | ||
| EOF | ||
| fi | ||
| cat << EOF >> user.bazelrc | ||
| build --repository_cache=/home/runner/repo-cache/ | ||
| build --color=yes | ||
| EOF | ||
| bazelisk info release | ||
| #! - name: Setup tmate session | ||
| #! uses: mxschmitt/action-tmate@v3 | ||
| - uses: actions/setup-dotnet@v4 | ||
| if: inputs.plugin == 'rabbit' | ||
| with: | ||
| dotnet-version: '8.0' | ||
| - name: deps/amqp10_client SETUP | ||
| if: inputs.plugin == 'amqp10_client' | ||
| run: | | ||
| # reduce sandboxing so that activemq works | ||
| cat << EOF >> user.bazelrc | ||
| build --strategy=TestRunner=local | ||
| EOF | ||
| - name: deps/rabbit SETUP | ||
| if: inputs.plugin == 'rabbit' | ||
| run: | | ||
| # reduce sandboxing so that maven works | ||
| cat << EOF >> user.bazelrc | ||
| build --strategy=TestRunner=local | ||
| EOF | ||
| - name: deps/rabbitmq_auth_backend_ldap SETUP | ||
| if: inputs.plugin == 'rabbitmq_auth_backend_ldap' | ||
| run: | | ||
| sudo apt-get update && \ | ||
| sudo apt-get install -y \ | ||
| ldap-utils \ | ||
| slapd | ||
| sudo systemctl is-active --quiet apparmor.service && sudo systemctl stop apparmor.service | ||
| sudo systemctl disable apparmor.service | ||
| cat << EOF >> user.bazelrc | ||
| build --strategy=TestRunner=local | ||
| EOF | ||
| - name: deps/rabbitmq_mqtt SETUP | ||
| if: inputs.plugin == 'rabbitmq_mqtt' | ||
| run: | | ||
| cat << EOF >> user.bazelrc | ||
| build --strategy=TestRunner=local | ||
| EOF | ||
| - name: deps/rabbitmq_peer_discovery_consul SETUP | ||
| if: inputs.plugin == 'rabbitmq_peer_discovery_consul' | ||
| run: | | ||
| cat << EOF >> user.bazelrc | ||
| build --strategy=TestRunner=local | ||
| EOF | ||
| - name: deps/rabbitmq_stream SETUP | ||
| if: inputs.plugin == 'rabbitmq_stream' | ||
| run: | | ||
| cat << EOF >> user.bazelrc | ||
| build --strategy=TestRunner=local | ||
| EOF | ||
| - name: deps/rabbitmq_stream_management SETUP | ||
| if: inputs.plugin == 'rabbitmq_stream_management' | ||
| run: | | ||
| cat << EOF >> user.bazelrc | ||
| build --strategy=TestRunner=local | ||
| EOF | ||
| - name: deps/rabbitmq_tracing SETUP | ||
| if: inputs.plugin == 'rabbitmq_tracing' | ||
| run: | | ||
| cat << EOF >> user.bazelrc | ||
| build --strategy=TestRunner=local | ||
| EOF | ||
| - name: COMPUTE TESTS IN SHARD | ||
| id: shard | ||
| run: | | ||
| bazelisk cquery \ | ||
| 'attr("tags", "mixed-version-cluster", tests(//deps/${{ inputs.plugin }}/...)) except attr("tags", "manual", //deps/${{ inputs.plugin }}/...)' \ | ||
| --output=label \ | ||
| | awk '{print $1;}' > tests.log | ||
| if [[ $(wc -l < tests.log) != "0" ]]; then | ||
| split -da 3 -l $((`wc -l < tests.log`/${{ inputs.shard_count }})) tests.log shard | ||
| printf -v padded_index "%03d" ${{ inputs.shard_index }} | ||
| echo "file=shard$padded_index" | tee -a $GITHUB_OUTPUT | ||
| else | ||
| echo "No tests in this shard" | ||
| echo "file=" | tee -a $GITHUB_OUTPUT | ||
| fi | ||
| - name: RUN TESTS | ||
| if: steps.shard.outputs.file != '' && inputs.plugin != 'rabbitmq_peer_discovery_aws' | ||
| run: | | ||
| echo "Tests in shard:" | ||
| cat ${{ steps.shard.outputs.file }} | ||
| echo "" | ||
| ## WARNING: | ||
| ## secrets must not be set in --test_env or --action_env, | ||
| ## or otherwise logs must not be saved as artifacts. | ||
| ## rabbit_ct_helpers or other code may log portions of the | ||
| ## env vars and leak them | ||
| bazelisk test $(< ${{ steps.shard.outputs.file }}) \ | ||
| --test_env RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }} \ | ||
| --build_tests_only \ | ||
| --verbose_failures | ||
| - name: UPLOAD TEST LOGS | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bazel-testlogs-${{ inputs.plugin }}-${{ inputs.shard_index }}-${{ matrix.erlang_version }}-${{ matrix.metadata_store }}-mixed | ||
| path: | | ||
| bazel-testlogs/deps/${{ inputs.plugin }}/* | ||