Skip to content

Commit 9465fb5

Browse files
committed
Avoid the need for all the extra artifacts
1 parent a571b86 commit 9465fb5

File tree

2 files changed

+364
-672
lines changed

2 files changed

+364
-672
lines changed

.github/workflows/templates/test-make.template.yaml

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,20 @@
3939
key: ${{ runner.os }}-make-cache-${{ needs.xref.outputs.hash }}
4040
fail-on-cache-miss: true
4141
- name: RESTORE TEST RESULT CACHE
42-
uses: actions/cache/restore@v3
42+
uses: actions/cache@v4
4343
with:
4444
path: /home/runner/test-result-cache/
45-
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
45+
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-(@= name @)-${{ github.run_number }}-${{ github.run_attempt }}
4646
restore-keys: |
47-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ needs.xref.outputs.previous_run_attempt }}
48-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-
49-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-
47+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-(@= name @)-${{ github.run_number }}-${{ needs.xref.outputs.previous_run_attempt }}
48+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-(@= name @)-${{ github.run_number }}-
49+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-(@= name @)-
50+
save-always: true
5051
- name: PRINT CACHED RESULTS
5152
run: |
5253
set -x
5354
tree /home/runner/test-result-cache
55+
continue-on-error: true
5456
- name: SETUP ERLANG/ELIXIR
5557
uses: erlef/setup-beam@v1
5658
with:
@@ -97,13 +99,6 @@
9799
touch ${{ env.SUCCESS_PATH }}/ct-(@= suite @)
98100
fi
99101
#@ end
100-
- name: SAVE CACHE COPY
101-
if: always()
102-
uses: actions/[email protected]
103-
with:
104-
name: trc-(@= name @)-${{ matrix.metadata_store }}-${{ matrix.otp_version }}
105-
path: |
106-
/home/runner/test-result-cache
107102
- name: UPLOAD TEST ARTIFACTS
108103
if: always()
109104
uses: actions/[email protected]
@@ -136,18 +131,20 @@
136131
key: ${{ runner.os }}-make-cache-${{ needs.xref.outputs.hash }}
137132
fail-on-cache-miss: true
138133
- name: RESTORE TEST RESULT CACHE
139-
uses: actions/cache/restore@v3
134+
uses: actions/cache@v4
140135
with:
141136
path: /home/runner/test-result-cache/
142-
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
137+
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-rabbitmq_cli-${{ github.run_number }}-${{ github.run_attempt }}
143138
restore-keys: |
144-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ needs.xref.outputs.previous_run_attempt }}
145-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-
146-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-
139+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-rabbitmq_cli-${{ github.run_number }}-${{ needs.xref.outputs.previous_run_attempt }}
140+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-rabbitmq_cli-${{ github.run_number }}-
141+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-rabbitmq_cli-
142+
save-always: true
147143
- name: PRINT CACHED RESULTS
148144
run: |
149145
set -x
150146
tree /home/runner/test-result-cache
147+
continue-on-error: true
151148
- name: SETUP ERLANG/ELIXIR
152149
uses: erlef/setup-beam@v1
153150
with:
@@ -167,13 +164,6 @@
167164
RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }}
168165
touch ${{ env.SUCCESS_PATH }}/checks
169166
fi
170-
- name: SAVE CACHE COPY
171-
if: always()
172-
uses: actions/[email protected]
173-
with:
174-
name: trc-rabbitmq_cli-${{ matrix.metadata_store }}-${{ matrix.otp_version }}
175-
path: |
176-
/home/runner/test-result-cache
177167
- name: UPLOAD TEST ARTIFACTS
178168
if: always()
179169
uses: actions/[email protected]
@@ -252,30 +242,6 @@ jobs:
252242
needs: #@ ["xref", "test-rabbit", "test-rabbitmq_cli"] + job_names(data.values.internal_deps + data.values.tier1_plugins)
253243
runs-on: ubuntu-latest
254244
steps:
255-
- name: RESTORE TEST RESULT CACHE
256-
uses: actions/cache/restore@v3
257-
with:
258-
path: /home/runner/test-result-cache/
259-
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
260-
restore-keys: |
261-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ needs.xref.outputs.previous_run_attempt }}
262-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-
263-
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-
264-
- name: UPDATE CACHE
265-
uses: actions/download-artifact@v4
266-
with:
267-
pattern: trc-*
268-
path: /home/runner/test-result-cache
269-
merge-multiple: true
270-
- name: PRINT RESULTS
271-
run: |
272-
set -x
273-
tree /home/runner/test-result-cache
274-
- name: SAVE TEST RESULT CACHE
275-
uses: actions/cache/save@v3
276-
with:
277-
path: /home/runner/test-result-cache/
278-
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
279245
- name: SUMMARY
280246
run: |
281247
cat << 'EOF' | jq -e 'map(.result == "success") | all(.)'

0 commit comments

Comments
 (0)