@@ -173,26 +173,9 @@ jobs:
173173 if [ ! -f gib-impacted.log ] || grep -q testing/trino-test-jdbc-compatibility-old-server gib-impacted.log; then
174174 $MAVEN test ${MAVEN_TEST} -pl :trino-test-jdbc-compatibility-old-server
175175 fi
176- - name : Upload test results
177- uses : actions/upload-artifact@v3
178- # Upload all test reports only on failure, because the artifacts are large
179- if : failure()
176+ - uses : ./.github/actions/upload
180177 with :
181- name : result ${{ github.job }}
182- path : |
183- **/target/surefire-reports
184- **/target/checkstyle-*
185- - name : Upload test report
186- uses : actions/upload-artifact@v3
187- # Always upload the test report for the annotate.yml workflow,
188- # but only the single XML file to keep the artifact small
189- if : always()
190- with :
191- # Name prefix is checked in the `Annotate checks` workflow
192- name : test report ${{ github.job }}
193- path : |
194- **/surefire-reports/TEST-*.xml
195- retention-days : ${{ env.TEST_REPORT_RETENTION_DAYS }}
178+ test-report-retention-days : ${{ env.TEST_REPORT_RETENTION_DAYS }}
196179 - name : Clean local Maven repo
197180 # Avoid creating a cache entry because this job doesn't download all dependencies
198181 if : steps.cache.outputs.cache-hit != 'true'
@@ -295,26 +278,10 @@ jobs:
295278 run : |
296279 source plugin/trino-hive-hadoop2/conf/hive-tests-${{ matrix.config }}.sh &&
297280 plugin/trino-hive-hadoop2/bin/run_hive_alluxio_tests.sh
298- - name : Upload test results
299- uses : actions/upload-artifact@v3
300- # Upload all test reports only on failure, because the artifacts are large
301- if : failure()
281+ - uses : ./.github/actions/upload
302282 with :
303- name : result ${{ github.job }}
304- path : |
305- **/target/surefire-reports
306- **/target/checkstyle-*
307- - name : Upload test report
308- uses : actions/upload-artifact@v3
309- # Always upload the test report for the annotate.yml workflow,
310- # but only the single XML file to keep the artifact small
311- if : always()
312- with :
313- # Name prefix is checked in the `Annotate checks` workflow
314- name : test report ${{ github.job }} (${{ matrix.config }})
315- path : |
316- **/surefire-reports/TEST-*.xml
317- retention-days : ${{ env.TEST_REPORT_RETENTION_DAYS }}
283+ name-suffix : ${{ github.job }} (${{ matrix.config }})
284+ test-report-retention-days : ${{ env.TEST_REPORT_RETENTION_DAYS }}
318285 - name : Clean local Maven repo
319286 # Avoid creating a cache entry because this job doesn't download all dependencies
320287 if : steps.cache.outputs.cache-hit != 'true'
@@ -364,26 +331,9 @@ jobs:
364331 !:trino-sqlserver,
365332 !:trino-test-jdbc-compatibility-old-server,
366333 !:trino-tests'
367- - name : Upload test results
368- uses : actions/upload-artifact@v3
369- # Upload all test reports only on failure, because the artifacts are large
370- if : failure()
334+ - uses : ./.github/actions/upload
371335 with :
372- name : result ${{ github.job }}
373- path : |
374- **/target/surefire-reports
375- **/target/checkstyle-*
376- - name : Upload test report
377- uses : actions/upload-artifact@v3
378- # Always upload the test report for the annotate.yml workflow,
379- # but only the single XML file to keep the artifact small
380- if : always()
381- with :
382- # Name prefix is checked in the `Annotate checks` workflow
383- name : test report ${{ github.job }}
384- path : |
385- **/surefire-reports/TEST-*.xml
386- retention-days : ${{ env.TEST_REPORT_RETENTION_DAYS }}
336+ test-report-retention-days : ${{ env.TEST_REPORT_RETENTION_DAYS }}
387337 - name : Clean local Maven repo
388338 # Avoid creating a cache entry because this job doesn't download all dependencies
389339 if : steps.cache.outputs.cache-hit != 'true'
@@ -551,26 +501,10 @@ jobs:
551501 # ", :, <, >, |, *, ?, \, / are not allowed in artifact names, replace it with an underscore
552502 name=$(echo -n "${{ matrix.modules }}" | sed -e 's/[":<>|\*\?\\\/]/_/g')
553503 echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV
554- - name : Upload test results
555- uses : actions/upload-artifact@v3
556- # Upload all test reports only on failure, because the artifacts are large
557- if : failure()
504+ - uses : ./.github/actions/upload
558505 with :
559- name : result ${{ env.ARTIFACT_NAME }}
560- path : |
561- **/target/surefire-reports
562- **/target/checkstyle-*
563- - name : Upload test report
564- uses : actions/upload-artifact@v3
565- # Always upload the test report for the annotate.yml workflow,
566- # but only the single XML file to keep the artifact small
567- if : always()
568- with :
569- # Name prefix is checked in the `Annotate checks` workflow
570- name : test report ${{ github.job }} (${{ env.ARTIFACT_NAME }})
571- path : |
572- **/surefire-reports/TEST-*.xml
573- retention-days : ${{ env.TEST_REPORT_RETENTION_DAYS }}
506+ name-suffix : ${{ env.ARTIFACT_NAME }}
507+ test-report-retention-days : ${{ env.TEST_REPORT_RETENTION_DAYS }}
574508 - name : Clean local Maven repo
575509 # Avoid creating a cache entry because this job doesn't download all dependencies
576510 if : steps.cache.outputs.cache-hit != 'true'
0 commit comments