3131 type : boolean
3232
3333jobs :
34- load-catalog :
35- runs-on : ubuntu-latest
36- name : Load Test Catalog
37- steps :
38- - name : Checkout main
39- uses : actions/checkout@v4
40- with :
41- persist-credentials : false
42-
43- - name : Checkout test-catalog
44- uses : actions/checkout@v4
45- with :
46- ref : ' test-catalog'
47- persist-credentials : false
48- fetch-depth : 100 # Needs to be large enough to ensure we can fetch N days ago
49- path : test-catalog
50-
51- - name : Checkout catalog at earlier date
52- run : |
53- cd test-catalog
54- SHA=$(git rev-list -1 --before 7.days.ago origin/test-catalog)
55- echo $SHA
56- git switch --detach $SHA
57- git show --no-patch
58-
59- - name : Setup Python
60- uses : ./.github/actions/setup-python
61-
62- # Prior to this step, we don't expect any errors. For the rest of this "load-catalog" job, we need to ensure
63- # we do not fail as this will fail the overall workflow.
64- - name : Combine Catalog into single file
65- id : combine-catalog
66- continue-on-error : true
67- run : |
68- python .github/scripts/format-test-catalog.py --path "test-catalog/test-catalog/**/*.yaml"
69-
70- - name : Archive Combined Test Catalog
71- if : steps.combine-catalog.outcome == 'success'
72- uses : actions/upload-artifact@v4
73- with :
74- name : combined-test-catalog
75- path : combined-test-catalog.txt
76- compression-level : 9
77-
7834 validate :
7935 runs-on : ubuntu-latest
8036 name : Compile and Check Java
@@ -145,7 +101,7 @@ jobs:
145101 fi
146102
147103 test :
148- needs : [validate, load-catalog ]
104+ needs : [validate]
149105 if : ${{ ! needs.validate.outputs.is-draft }}
150106 runs-on : ubuntu-latest
151107 strategy :
@@ -170,22 +126,13 @@ jobs:
170126 gradle-cache-write-only : ${{ inputs.is-trunk }}
171127 develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
172128
173- # If the load-catalog job failed, we won't be able to download the artifact. Since we don't want this to fail
174- # the overall workflow, so we'll continue here without a test catalog.
175- - name : Load Test Catalog
176- id : load-test-catalog
177- uses : actions/download-artifact@v4
178- continue-on-error : true
179- with :
180- name : combined-test-catalog
181-
182129 - name : JUnit Quarantined Tests
183130 id : junit-quarantined-test
184131 uses : ./.github/actions/run-gradle
185132 with :
186133 test-task : quarantinedTest
187134 timeout-minutes : 180
188- test-catalog-path : ${{ steps.load-test-catalog.outputs.download-path }}/combined-test-catalog .txt
135+ test-catalog-path : missing .txt
189136 build-scan-artifact-name : build-scan-quarantined-test-${{ matrix.java }}
190137
191138 - name : JUnit Tests
@@ -194,7 +141,7 @@ jobs:
194141 with :
195142 test-task : test
196143 timeout-minutes : 180 # 3 hours
197- test-catalog-path : ${{ steps.load-test-catalog.outputs.download-path }}/combined-test-catalog .txt
144+ test-catalog-path : missing .txt
198145 build-scan-artifact-name : build-scan-test-${{ matrix.java }}
199146
200147 - name : Archive JUnit HTML reports
@@ -235,50 +182,3 @@ jobs:
235182 THREAD_DUMP_URL : ${{ steps.thread-dump-upload-artifact.outputs.artifact-url }}
236183 GRADLE_TEST_EXIT_CODE : ${{ steps.junit-test.outputs.gradle-exitcode }}
237184 GRADLE_QUARANTINED_TEST_EXIT_CODE : ${{ steps.junit-quarantined-test.outputs.gradle-exitcode }}
238-
239- - name : Archive Test Catalog
240- if : ${{ always() && matrix.java == '23' }}
241- uses : actions/upload-artifact@v4
242- with :
243- name : test-catalog
244- path : test-catalog
245- compression-level : 9
246- if-no-files-found : ignore
247-
248- update-test-catalog :
249- name : Update Test Catalog
250- needs : test
251- if : ${{ always() && inputs.is-trunk && needs.test.outputs.timed-out == 'false' }}
252- runs-on : ubuntu-latest
253- permissions :
254- contents : write
255- steps :
256- - name : Checkout Test Catalog
257- uses : actions/checkout@v4
258- with :
259- persist-credentials : true # Needed to commit and push later
260- ref : test-catalog
261- - name : Reset Catalog
262- run : |
263- rm -rf test-catalog
264- - name : Download Test Catalog
265- uses : actions/download-artifact@v4
266- with :
267- name : test-catalog
268- path : test-catalog
269- - name : Push Test Catalog
270- # Git user.name and user.email come from https://github.com/actions/checkout?tab=readme-ov-file#push-a-commit-using-the-built-in-token
271- env :
272- COMMIT_MSG : |
273- Update test catalog data for GHA workflow run ${{ github.run_id }}
274-
275- Commit: https://github.com/apache/kafka/commit/${{ github.sha }}
276- GitHub Run: https://github.com/apache/kafka/actions/runs/${{ github.run_id }}
277- run : |
278- pwd
279- ls -R
280- git config user.name 'github-actions[bot]'
281- git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
282- git add test-catalog
283- git diff --quiet && git diff --staged --quiet || git commit -m "$COMMIT_MSG"
284- git push
0 commit comments