diff --git a/.github/workflows/test-make.template.yaml b/.github/workflows/test-make.template.yaml new file mode 100644 index 000000000000..b448a6677b2f --- /dev/null +++ b/.github/workflows/test-make.template.yaml @@ -0,0 +1,123 @@ +#@ load("@ytt:data", "data") +#@yaml/text-templated-strings + +#@ def job_names(plugins): +#@ names = [] +#@ for p in plugins: +#@ names.append("test-"+p) +#@ end +#@ return names +#@ end +--- +name: Test (make) +on: + push: + branches: + - main + - v3.13.x + - v3.12.x + - v3.11.x + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true +jobs: + load-test-result-cache: + runs-on: ubuntu-latest + outputs: + hash: ${{ steps.hash.outputs.hash }} + steps: + - name: CHECKOUT REPOSITORY + uses: actions/checkout@v4 + - name: ENSURE WORKFLOWS ARE UP TO DATE + run: | + make actions-workflows + git diff --exit-code + - name: COMPUTE REPO HASH + id: hash + run: | + echo "hash=${{ hashFiles('**/*', '!.github/**/*', '!*.bazel', '!*.bzl', '!BUILD.*') }}" | tee -a $GITHUB_OUTPUT + - name: MOUNT TEST RESULT CACHE + uses: actions/cache@v4.0.2 + with: + path: /home/runner/test-result-cache/ + key: ${{ runner.os }}-test-result-cache-${{ steps.hash.outputs.hash }} + restore-keys: | + ${{ runner.os }}-test-result-cache- + save-always: true + - name: PREP CACHE DIR + run: | + mkdir -p /home/runner/test-result-cache/${{ steps.hash.outputs.hash }} + touch /home/runner/test-result-cache/marker + - name: UPLOAD IT AS AN ARTIFACT + uses: actions/upload-artifact@v4 + with: + name: test-result-cache-subdir + #! force the archive to include the sha + #! by controlling the common prefix + path: | + /home/runner/test-result-cache/marker + /home/runner/test-result-cache/${{ steps.hash.outputs.hash }} + retention-days: 1 +#@ for plugin in data.values.internal_deps: + test-(@= plugin @): + needs: + - load-test-result-cache + uses: ./.github/workflows/test-(@= plugin @).yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: #@ plugin == 'rabbitmq_ct_helpers' or plugin == 'trust_store_http' +#@ end + test-rabbit: + needs: #@ ["load-test-result-cache"] + job_names(data.values.internal_deps) + uses: ./.github/workflows/test-rabbit.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_cli: + needs: + - load-test-result-cache + - test-rabbit + uses: ./.github/workflows/test-rabbitmq_cli.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} +#@ for plugin in data.values.tier1_plugins: + test-(@= plugin @): + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-(@= plugin @).yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} +#@ end + summary-test-make: + if: always() + needs: #@ ["load-test-result-cache", "test-rabbit", "test-rabbitmq_cli"] + job_names(data.values.internal_deps + data.values.tier1_plugins) + runs-on: ubuntu-latest + steps: + - name: MOUNT TEST RESULT CACHE + uses: actions/cache@v4.0.2 + with: + path: /home/runner/test-result-cache/ + key: ${{ runner.os }}-test-result-cache-${{ needs.load-test-result-cache.outputs.hash }} + restore-keys: | + ${{ runner.os }}-test-result-cache- + save-always: true + - name: UPDATE CACHE + uses: actions/download-artifact@v4 + with: + pattern: trc-* + path: /home/runner/test-result-cache + merge-multiple: true + - name: PRINT RESULTS + run: | + set -x + tree /home/runner/test-result-cache/${{ needs.load-test-result-cache.outputs.hash }} + - name: SUMMARY + run: | + cat << 'EOF' | jq -e 'map(.result == "success") | all(.)' + ${{ toJson(needs) }} + EOF diff --git a/.github/workflows/test-make.yaml b/.github/workflows/test-make.yaml index f88e16106ed2..49676a094615 100644 --- a/.github/workflows/test-make.yaml +++ b/.github/workflows/test-make.yaml @@ -2,10 +2,10 @@ name: Test (make) on: push: branches: - - main - - v3.13.x - - v3.12.x - - v3.11.x + - main + - v3.13.x + - v3.12.x + - v3.11.x pull_request: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -16,153 +16,520 @@ jobs: outputs: hash: ${{ steps.hash.outputs.hash }} steps: - - name: CHECKOUT REPOSITORY - uses: actions/checkout@v4 - - name: COMPUTE REPO HASH - id: hash - run: | - echo "hash=${{ hashFiles('**/*', '!.github/**/*', '!*.bazel', '!*.bzl', '!BUILD.*') }}" | tee -a $GITHUB_OUTPUT - - name: MOUNT TEST RESULT CACHE - uses: actions/cache@v4.0.2 - with: - path: /home/runner/test-result-cache/ - key: ${{ runner.os }}-test-result-cache-${{ steps.hash.outputs.hash }} - restore-keys: | - ${{ runner.os }}-test-result-cache- - save-always: true - - name: PREP CACHE DIR - run: | - mkdir -p /home/runner/test-result-cache/${{ steps.hash.outputs.hash }} - touch /home/runner/test-result-cache/marker - - name: UPLOAD IT AS AN ARTIFACT - uses: actions/upload-artifact@v4 - with: - name: test-result-cache-subdir - # force the archive to include the sha - # by controlling the common prefix - path: | - /home/runner/test-result-cache/marker - /home/runner/test-result-cache/${{ steps.hash.outputs.hash }} - retention-days: 1 - - test-internal-deps: - needs: - - load-test-result-cache - strategy: - fail-fast: false - matrix: - plugin: - - amqp10_client - - amqp10_common - - amqp_client - - oauth2_client - - rabbitmq_ct_client_helpers - - rabbitmq_ct_helpers - - rabbitmq_stream_common - - trust_store_http - uses: ./.github/workflows/test-${{ matrix.plugin }}.yaml - with: - trc: /home/runner/test-result-cache - hash: ${{ needs.load-test-result-cache.outputs.hash }} - ignore-dialyze-errors: ${{ matrix.plugin == 'rabbitmq_ct_helpers' || matrix.plugin == 'trust_store_http' }} + - name: CHECKOUT REPOSITORY + uses: actions/checkout@v4 + - name: ENSURE WORKFLOWS ARE UP TO DATE + run: | + make actions-workflows + git diff --exit-code + - name: COMPUTE REPO HASH + id: hash + run: | + echo "hash=${{ hashFiles('**/*', '!.github/**/*', '!*.bazel', '!*.bzl', '!BUILD.*') }}" | tee -a $GITHUB_OUTPUT + - name: MOUNT TEST RESULT CACHE + uses: actions/cache@v4.0.2 + with: + path: /home/runner/test-result-cache/ + key: ${{ runner.os }}-test-result-cache-${{ steps.hash.outputs.hash }} + restore-keys: | + ${{ runner.os }}-test-result-cache- + save-always: true + - name: PREP CACHE DIR + run: | + mkdir -p /home/runner/test-result-cache/${{ steps.hash.outputs.hash }} + touch /home/runner/test-result-cache/marker + - name: UPLOAD IT AS AN ARTIFACT + uses: actions/upload-artifact@v4 + with: + name: test-result-cache-subdir + path: | + /home/runner/test-result-cache/marker + /home/runner/test-result-cache/${{ steps.hash.outputs.hash }} + retention-days: 1 + test-amqp10_client: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-amqp10_client.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: false + test-amqp10_common: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-amqp10_common.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: false + test-amqp_client: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-amqp_client.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: false + test-oauth2_client: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-oauth2_client.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: false + test-rabbit_common: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-rabbit_common.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: false + test-rabbitmq_ct_client_helpers: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-rabbitmq_ct_client_helpers.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: false + test-rabbitmq_ct_helpers: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-rabbitmq_ct_helpers.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: true + test-rabbitmq_stream_common: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-rabbitmq_stream_common.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: false + test-trust_store_http: + needs: + - load-test-result-cache + uses: ./.github/workflows/test-trust_store_http.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + ignore-dialyze-errors: true test-rabbit: needs: - - load-test-result-cache - - test-internal-deps + - load-test-result-cache + - test-amqp10_client + - test-amqp10_common + - test-amqp_client + - test-oauth2_client + - test-rabbit_common + - test-rabbitmq_ct_client_helpers + - test-rabbitmq_ct_helpers + - test-rabbitmq_stream_common + - test-trust_store_http uses: ./.github/workflows/test-rabbit.yaml with: trc: /home/runner/test-result-cache hash: ${{ needs.load-test-result-cache.outputs.hash }} test-rabbitmq_cli: needs: - - load-test-result-cache - - test-rabbit + - load-test-result-cache + - test-rabbit uses: ./.github/workflows/test-rabbitmq_cli.yaml with: trc: /home/runner/test-result-cache hash: ${{ needs.load-test-result-cache.outputs.hash }} - test-tier1: - needs: - - load-test-result-cache - - test-rabbit - - test-rabbitmq_cli - strategy: - fail-fast: false - matrix: - plugin: - - rabbitmq_amqp1_0 - - 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_jms_topic_exchange - - rabbitmq_management - - rabbitmq_management_agent - - rabbitmq_mqtt - - rabbitmq_peer_discovery_aws - - rabbitmq_peer_discovery_common - - rabbitmq_peer_discovery_consul - - rabbitmq_peer_discovery_etcd - - rabbitmq_peer_discovery_k8s - - rabbitmq_prelaunch - - rabbitmq_prometheus - - rabbitmq_random_exchange - - rabbitmq_recent_history_exchange - - rabbitmq_sharding - - rabbitmq_shovel - - rabbitmq_shovel_management - - rabbitmq_stomp - - rabbitmq_stream - - rabbitmq_stream_management - - rabbitmq_top - - rabbitmq_tracing - - rabbitmq_trust_store - - rabbitmq_web_dispatch - - rabbitmq_web_mqtt - - rabbitmq_web_mqtt_examples - - rabbitmq_web_stomp - - rabbitmq_web_stomp_examples - uses: ./.github/workflows/test-${{ matrix.plugin }}.yaml + test-rabbitmq_amqp_client: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_amqp_client.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_amqp1_0: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_amqp1_0.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_auth_backend_cache: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_auth_backend_cache.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_auth_backend_http: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_auth_backend_http.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_auth_backend_ldap: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_auth_backend_ldap.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_auth_backend_oauth2: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_auth_backend_oauth2.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_auth_mechanism_ssl: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_auth_mechanism_ssl.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_aws: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_aws.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_consistent_hash_exchange: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_consistent_hash_exchange.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_event_exchange: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_event_exchange.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_federation: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_federation.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_federation_management: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_federation_management.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_jms_topic_exchange: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_jms_topic_exchange.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_management: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_management.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_management_agent: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_management_agent.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_mqtt: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_mqtt.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_peer_discovery_aws: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_peer_discovery_aws.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_peer_discovery_common: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_peer_discovery_common.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_peer_discovery_consul: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_peer_discovery_consul.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_peer_discovery_etcd: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_peer_discovery_etcd.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_peer_discovery_k8s: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_peer_discovery_k8s.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_prelaunch: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_prelaunch.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_prometheus: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_prometheus.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_random_exchange: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_random_exchange.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_recent_history_exchange: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_recent_history_exchange.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_sharding: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_sharding.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_shovel: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_shovel.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_shovel_management: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_shovel_management.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_stomp: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_stomp.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_stream: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_stream.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_stream_management: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_stream_management.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_top: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_top.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_tracing: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_tracing.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_trust_store: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_trust_store.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_web_dispatch: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_web_dispatch.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_web_mqtt: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_web_mqtt.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_web_mqtt_examples: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_web_mqtt_examples.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_web_stomp: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_web_stomp.yaml + with: + trc: /home/runner/test-result-cache + hash: ${{ needs.load-test-result-cache.outputs.hash }} + test-rabbitmq_web_stomp_examples: + needs: + - load-test-result-cache + - test-rabbitmq_cli + uses: ./.github/workflows/test-rabbitmq_web_stomp_examples.yaml with: trc: /home/runner/test-result-cache hash: ${{ needs.load-test-result-cache.outputs.hash }} summary-test-make: if: always() needs: - - load-test-result-cache - - test-internal-deps - - test-rabbit - - test-rabbitmq_cli - - test-tier1 + - load-test-result-cache + - test-rabbit + - test-rabbitmq_cli + - test-amqp10_client + - test-amqp10_common + - test-amqp_client + - test-oauth2_client + - test-rabbit_common + - test-rabbitmq_ct_client_helpers + - test-rabbitmq_ct_helpers + - test-rabbitmq_stream_common + - test-trust_store_http + - test-rabbitmq_amqp_client + - test-rabbitmq_amqp1_0 + - test-rabbitmq_auth_backend_cache + - test-rabbitmq_auth_backend_http + - test-rabbitmq_auth_backend_ldap + - test-rabbitmq_auth_backend_oauth2 + - test-rabbitmq_auth_mechanism_ssl + - test-rabbitmq_aws + - test-rabbitmq_consistent_hash_exchange + - test-rabbitmq_event_exchange + - test-rabbitmq_federation + - test-rabbitmq_federation_management + - test-rabbitmq_jms_topic_exchange + - test-rabbitmq_management + - test-rabbitmq_management_agent + - test-rabbitmq_mqtt + - test-rabbitmq_peer_discovery_aws + - test-rabbitmq_peer_discovery_common + - test-rabbitmq_peer_discovery_consul + - test-rabbitmq_peer_discovery_etcd + - test-rabbitmq_peer_discovery_k8s + - test-rabbitmq_prelaunch + - test-rabbitmq_prometheus + - test-rabbitmq_random_exchange + - test-rabbitmq_recent_history_exchange + - test-rabbitmq_sharding + - test-rabbitmq_shovel + - test-rabbitmq_shovel_management + - test-rabbitmq_stomp + - test-rabbitmq_stream + - test-rabbitmq_stream_management + - test-rabbitmq_top + - test-rabbitmq_tracing + - test-rabbitmq_trust_store + - test-rabbitmq_web_dispatch + - test-rabbitmq_web_mqtt + - test-rabbitmq_web_mqtt_examples + - test-rabbitmq_web_stomp + - test-rabbitmq_web_stomp_examples runs-on: ubuntu-latest steps: - - name: MOUNT TEST RESULT CACHE - uses: actions/cache@v4.0.2 - with: - path: /home/runner/test-result-cache/ - key: ${{ runner.os }}-test-result-cache-${{ needs.load-test-result-cache.outputs.hash }} - restore-keys: | - ${{ runner.os }}-test-result-cache- - save-always: true - - name: UPDATE CACHE - uses: actions/download-artifact@v4 - with: - pattern: trc-* - path: /home/runner/test-result-cache - merge-multiple: true - - name: PRINT RESULTS - run: | - set -x - tree /home/runner/test-result-cache/${{ needs.load-test-result-cache.outputs.hash }} - - name: SUMMARY - run: | - cat << 'EOF' | jq -e 'map(.result == "success") | all(.)' - ${{ toJson(needs) }} - EOF + - name: MOUNT TEST RESULT CACHE + uses: actions/cache@v4.0.2 + with: + path: /home/runner/test-result-cache/ + key: ${{ runner.os }}-test-result-cache-${{ needs.load-test-result-cache.outputs.hash }} + restore-keys: | + ${{ runner.os }}-test-result-cache- + save-always: true + - name: UPDATE CACHE + uses: actions/download-artifact@v4 + with: + pattern: trc-* + path: /home/runner/test-result-cache + merge-multiple: true + - name: PRINT RESULTS + run: | + set -x + tree /home/runner/test-result-cache/${{ needs.load-test-result-cache.outputs.hash }} + - name: SUMMARY + run: | + cat << 'EOF' | jq -e 'map(.result == "success") | all(.)' + ${{ toJson(needs) }} + EOF diff --git a/Makefile b/Makefile index e5b5efe5e1e4..564c95df059c 100644 --- a/Makefile +++ b/Makefile @@ -558,13 +558,18 @@ install-windows-docs: install-windows-erlapp esac; \ done -TESTED_PLUGINS := \ - amqp_client \ +INTERNAL_DEPS := \ amqp10_client \ amqp10_common \ + amqp_client \ oauth2_client \ - rabbit \ rabbit_common \ + rabbitmq_ct_client_helpers \ + rabbitmq_ct_helpers \ + rabbitmq_stream_common \ + trust_store_http + +TIER1_PLUGINS := \ rabbitmq_amqp_client \ rabbitmq_amqp1_0 \ rabbitmq_auth_backend_cache \ @@ -574,8 +579,6 @@ TESTED_PLUGINS := \ rabbitmq_auth_mechanism_ssl \ rabbitmq_aws \ rabbitmq_consistent_hash_exchange \ - rabbitmq_ct_client_helpers \ - rabbitmq_ct_helpers \ rabbitmq_event_exchange \ rabbitmq_federation \ rabbitmq_federation_management \ @@ -597,7 +600,6 @@ TESTED_PLUGINS := \ rabbitmq_shovel_management \ rabbitmq_stomp \ rabbitmq_stream \ - rabbitmq_stream_common \ rabbitmq_stream_management \ rabbitmq_top \ rabbitmq_tracing \ @@ -606,14 +608,25 @@ TESTED_PLUGINS := \ rabbitmq_web_mqtt \ rabbitmq_web_mqtt_examples \ rabbitmq_web_stomp \ - rabbitmq_web_stomp_examples \ - trust_store_http + rabbitmq_web_stomp_examples + +TESTED_PLUGINS := $(INTERNAL_DEPS) rabbit $(TIER1_PLUGINS) PLUGIN_WORKFLOW_FILES := $(foreach p,$(TESTED_PLUGINS),.github/workflows/test-$p.yaml) -.PHONY: actions-workflows $(PLUGIN_WORKFLOW_FILES) +YTT ?= ytt + +.PHONY: actions-workflows .github/workflows/test-make.yaml $(PLUGIN_WORKFLOW_FILES) + +actions-workflows: .github/workflows/test-make.yaml $(PLUGIN_WORKFLOW_FILES) -actions-workflows: $(PLUGIN_WORKFLOW_FILES) +.github/workflows/test-make.yaml: .github/workflows/test-make.template.yaml + $(gen_verbose) $(YTT) \ + --file .github/workflows/test-make.template.yaml \ + --data-value-yaml internal_deps=[$(subst $(space),$(comma),$(foreach s,$(INTERNAL_DEPS),"$s"))] \ + --data-value-yaml tier1_plugins=[$(subst $(space),$(comma),$(foreach s,$(TIER1_PLUGINS),"$s"))] \ + | sed 's/^true:/on:/' \ + | sed 's/pull_request: null/pull_request:/'> $@ .github/workflows/test-%.yaml: $(gen_verbose) $(MAKE) -C deps/$* ../../.github/workflows/test-$*.yaml diff --git a/github-actions.mk b/github-actions.mk index a88b68d5897d..79ea138dcc1e 100644 --- a/github-actions.mk +++ b/github-actions.mk @@ -1,5 +1,3 @@ -YTT ?= ytt - ../../.github/workflows/test-$(PROJECT).yaml: $(wildcard test/*_SUITE.erl) ../../.github/workflows/test-plugin.template.yaml $(gen_verbose) $(YTT) \ --file ../../.github/workflows/test-plugin.template.yaml \