Skip to content

Commit c6677c5

Browse files
committed
Cache ActiveMQ to reduce downloads/flakes
1 parent 9099cfb commit c6677c5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/test-make-target.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
- name: FETCH TAGS
3434
run: git fetch --tags
3535

36+
- name: EXTRACT ACTIVEMQ VERSION
37+
run: |
38+
awk '/^ACTIVEMQ_VERSION/ {print $1 "=" $3}' deps/amqp10_client/Makefile >> $GITHUB_ENV
39+
3640
- name: SETUP OTP & ELIXIR
3741
uses: erlef/setup-beam@v1
3842
with:
@@ -99,12 +103,26 @@ jobs:
99103
docker run -d --network host --name erlang_low_version erlang:${LOW_ERLANG_VERSION} \
100104
erl -sname rabbit_fifo_prop@localhost -setcookie $(cat ~/.erlang.cookie) -noinput
101105
106+
- name: RESTORE ACTIVEMQ FROM CACHE
107+
uses: actions/cache/restore@v4
108+
id: cache-activemq-restore
109+
with:
110+
path: test/system_SUITE_data/apache-activemq-${{ env.ACTIVEMQ_VERSION }}-bin.tar.gz
111+
key: activemq-${{ env.ACTIVEMQ_VERSION }}
112+
102113
- name: RUN TESTS
103114
if: inputs.plugin != 'rabbitmq_cli'
104115
run: |
105116
sudo netstat -ntp
106117
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }}
107118
119+
- name: CACHE ACTIVEMQ
120+
uses: actions/cache/save@v4
121+
if: steps.cache-activemq-restore.outputs.cache-hit != 'true'
122+
with:
123+
path: test/system_SUITE_data/apache-activemq-${{ env.ACTIVEMQ_VERSION }}-bin.tar.gz
124+
key: activemq-${{ env.ACTIVEMQ_VERSION }}
125+
108126
# rabbitmq_cli needs a correct broker version for two of its tests.
109127
# But setting PROJECT_VERSION makes other plugins fail.
110128
- name: RUN TESTS (rabbitmq_cli)

0 commit comments

Comments
 (0)