From c956cb7719330c07005c701e2f146a93c798102a Mon Sep 17 00:00:00 2001 From: Guillaume Smet <guillaume.smet@gmail.com> Date: Tue, 30 Jan 2024 20:06:49 +0100 Subject: [PATCH 1/5] Always upload build reports This is important for flaky tests handling as flaky tests won't fail the build. --- .github/workflows/ci-actions-incremental.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index 35509b1ec4bfd..c4f36b97e6874 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -203,7 +203,7 @@ jobs: run: find ~/.m2 -name \*-SNAPSHOT -type d -exec rm -rf {} + - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-Initial JDK 17 Build" path: | @@ -383,7 +383,7 @@ jobs: retention-days: 7 - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-JVM Tests - JDK ${{matrix.java.name}}" path: | @@ -487,7 +487,7 @@ jobs: if [ -d 'integration-tests/maven/target/test-classes/projects/qit?uber?jar' ]; then mv 'integration-tests/maven/target/test-classes/projects/qit?uber?jar' 'integration-tests/maven/target/test-classes/projects/qit--uber--jar'; fi - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-Maven Tests - JDK ${{matrix.java.name}}" path: | @@ -566,7 +566,7 @@ jobs: run: ./mvnw $COMMON_MAVEN_ARGS $JVM_TEST_MAVEN_ARGS clean install -pl integration-tests/gradle - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-Gradle Tests - JDK ${{matrix.java.name}}" path: | @@ -653,7 +653,7 @@ jobs: retention-days: 7 - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-Devtools Tests - JDK ${{matrix.java.name}}" path: | @@ -739,7 +739,7 @@ jobs: retention-days: 7 - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-Kubernetes Tests - JDK ${{matrix.java.name}}" path: | @@ -804,7 +804,7 @@ jobs: export LANG=en_US && ./mvnw -e -B -fae --settings .github/mvn-settings.xml clean verify -DskipTests - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-Quickstarts Compilation - JDK ${{matrix.java.name}}" path: | @@ -870,7 +870,7 @@ jobs: export LANG=en_US && ./mvnw $COMMON_MAVEN_ARGS -f integration-tests/virtual-threads -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS -Dextra-args=--enable-preview -Dquarkus.native.container-build=true - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-Virtual Thread Support Tests Native - ${{matrix.category}}" path: | @@ -944,7 +944,7 @@ jobs: retention-days: 7 - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-MicroProfile TCKs Tests" path: | @@ -1044,7 +1044,7 @@ jobs: retention-days: 7 - name: Upload build reports (if build failed) uses: actions/upload-artifact@v3 - if: ${{ failure() || cancelled() }} + if: always() with: name: "build-reports-Native Tests - ${{matrix.category}}" path: | From bf8d7be73cff0959c369f437c87cfc7f71d5d12d Mon Sep 17 00:00:00 2001 From: Guillaume Smet <guillaume.smet@gmail.com> Date: Tue, 30 Jan 2024 20:07:58 +0100 Subject: [PATCH 2/5] Also analyze the results of the Quarkus Documentation CI workflow --- .github/quarkus-github-bot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/quarkus-github-bot.yml b/.github/quarkus-github-bot.yml index 4cdcb62e6fcd8..cedd0bc97c333 100644 --- a/.github/quarkus-github-bot.yml +++ b/.github/quarkus-github-bot.yml @@ -11,7 +11,7 @@ workflows: - "**/*.md" - "**/*.adoc" workflowRunAnalysis: - workflows: ["Quarkus CI"] + workflows: ["Quarkus CI", "Quarkus Documentation CI"] projectsClassic: rules: - labels: [area/documentation] From aa4e586425773a6d7216ca450d8d223e96a3b527 Mon Sep 17 00:00:00 2001 From: Guillaume Smet <guillaume.smet@gmail.com> Date: Tue, 30 Jan 2024 20:14:54 +0100 Subject: [PATCH 3/5] Retry failing tests on CI Now that we have flaky tests reports, we can retry tests on CI. --- independent-projects/parent/pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/independent-projects/parent/pom.xml b/independent-projects/parent/pom.xml index 5c970544aac88..2df6e460321f0 100644 --- a/independent-projects/parent/pom.xml +++ b/independent-projects/parent/pom.xml @@ -1047,6 +1047,20 @@ <build> <pluginManagement> <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <rerunFailingTestsCount>3</rerunFailingTestsCount> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <configuration> + <rerunFailingTestsCount>3</rerunFailingTestsCount> + </configuration> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> From 4426998296e6892c7b0db480b3520ba7b761ced2 Mon Sep 17 00:00:00 2001 From: Guillaume Smet <guillaume.smet@gmail.com> Date: Wed, 31 Jan 2024 15:14:32 +0100 Subject: [PATCH 4/5] Prezip reports to avoid Node.js and upload-artifact limitations https://github.com/actions/upload-artifact/issues/240 https://github.com/actions/upload-artifact/issues/39 + impossible to upload files with ? in the name and we have a test testing exactly that. --- .github/workflows/ci-actions-incremental.yml | 149 +++++++++++++------ 1 file changed, 100 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index c4f36b97e6874..099f6abb57dc6 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -201,15 +201,20 @@ jobs: retention-days: 7 - name: Delete snapshots artifacts from cache run: find ~/.m2 -name \*-SNAPSHOT -type d -exec rm -rf {} + - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + 'target/build-report.json' \ + 'target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-Initial JDK 17 Build" path: | - target/build-report.json - target/gradle-build-scan-url.txt - LICENSE.txt + build-reports.zip retention-days: 7 calculate-test-jobs: @@ -381,16 +386,21 @@ jobs: name: test-reports-jvm${{matrix.java.name}} path: 'test-reports.tgz' retention-days: 7 - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + '**/target/*-reports/TEST-*.xml' \ + 'target/build-report.json' \ + 'target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-JVM Tests - JDK ${{matrix.java.name}}" path: | - **/target/*-reports/TEST-*.xml - target/build-report.json - target/gradle-build-scan-url.txt - LICENSE.txt + build-reports.zip retention-days: 7 - name: Upload build.log (if build failed) uses: actions/upload-artifact@v3 @@ -485,16 +495,21 @@ jobs: if [ -d 'integration-tests/maven/target/test-classes/projects/qit?fast?jar' ]; then mv 'integration-tests/maven/target/test-classes/projects/qit?fast?jar' 'integration-tests/maven/target/test-classes/projects/qit--fast--jar'; fi if [ -d 'integration-tests/maven/target/test-classes/projects/qit?legacy?jar' ]; then mv 'integration-tests/maven/target/test-classes/projects/qit?legacy?jar' 'integration-tests/maven/target/test-classes/projects/qit--legacy--jar'; fi if [ -d 'integration-tests/maven/target/test-classes/projects/qit?uber?jar' ]; then mv 'integration-tests/maven/target/test-classes/projects/qit?uber?jar' 'integration-tests/maven/target/test-classes/projects/qit--uber--jar'; fi - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + '**/target/*-reports/TEST-*.xml' \ + 'target/build-report.json' \ + 'target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-Maven Tests - JDK ${{matrix.java.name}}" path: | - **/target/*-reports/TEST-*.xml - target/build-report.json - target/gradle-build-scan-url.txt - LICENSE.txt + build-reports.zip retention-days: 7 gradle-tests: @@ -564,17 +579,22 @@ jobs: CAPTURE_BUILD_SCAN: true # Important: keep -pl ... in sync with "Calculate run flags"! run: ./mvnw $COMMON_MAVEN_ARGS $JVM_TEST_MAVEN_ARGS clean install -pl integration-tests/gradle - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + '**/build/test-results/test/TEST-*.xml' \ + '**/target/*-reports/TEST-*.xml' \ + 'target/build-report.json' \ + 'target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-Gradle Tests - JDK ${{matrix.java.name}}" path: | - **/build/test-results/test/TEST-*.xml - **/target/*-reports/TEST-*.xml - target/build-report.json - target/gradle-build-scan-url.txt - LICENSE.txt + build-reports.zip retention-days: 7 devtools-tests: @@ -651,16 +671,21 @@ jobs: name: test-reports-devtools-java${{matrix.java.name}} path: 'test-reports.tgz' retention-days: 7 - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + '**/target/*-reports/TEST-*.xml' \ + 'target/build-report.json' \ + 'target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-Devtools Tests - JDK ${{matrix.java.name}}" path: | - **/target/*-reports/TEST-*.xml - target/build-report.json - target/gradle-build-scan-url.txt - LICENSE.txt + build-reports.zip retention-days: 7 kubernetes-tests: @@ -737,16 +762,21 @@ jobs: name: test-reports-kubernetes-java${{matrix.java.name}} path: 'test-reports.tgz' retention-days: 7 - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + '**/target/*-reports/TEST-*.xml' \ + 'target/build-report.json' \ + 'target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-Kubernetes Tests - JDK ${{matrix.java.name}}" path: | - **/target/*-reports/TEST-*.xml - target/build-report.json - **/target/gradle-build-scan-url.txt - LICENSE.txt + build-reports.zip retention-days: 7 quickstarts-tests: @@ -802,15 +832,20 @@ jobs: git clone https://github.com/quarkusio/quarkus-quickstarts.git && cd quarkus-quickstarts git checkout development export LANG=en_US && ./mvnw -e -B -fae --settings .github/mvn-settings.xml clean verify -DskipTests - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + 'quarkus-quickstarts/**/target/*-reports/TEST-*.xml' \ + 'quarkus-quickstarts/target/build-report.json' \ + 'quarkus-quickstarts/LICENSE' \ + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-Quickstarts Compilation - JDK ${{matrix.java.name}}" path: | - quarkus-quickstarts/**/target/*-reports/TEST-*.xml - quarkus-quickstarts/target/build-report.json - quarkus-quickstarts/LICENSE + build-reports.zip retention-days: 7 virtual-thread-native-tests: @@ -868,15 +903,21 @@ jobs: CAPTURE_BUILD_SCAN: true run: | export LANG=en_US && ./mvnw $COMMON_MAVEN_ARGS -f integration-tests/virtual-threads -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS -Dextra-args=--enable-preview -Dquarkus.native.container-build=true - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + 'integration-tests/virtual-threads/**/target/*-reports/TEST-*.xml' \ + 'integration-tests/virtual-threads/target/build-report.json' \ + 'integration-tests/virtual-threads/target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-Virtual Thread Support Tests Native - ${{matrix.category}}" path: | - integration-tests/virtual-threads/**/target/*-reports/TEST-*.xml - integration-tests/virtual-threads/target/build-report.json - integration-tests/virtual-threads/target/gradle-build-scan-url.txt + build-reports.zip retention-days: 7 tcks-test: @@ -942,16 +983,21 @@ jobs: name: test-reports-tcks path: 'test-reports.tgz' retention-days: 7 - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + '**/target/*-reports/TEST-*.xml' \ + 'target/build-report.json' \ + 'target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-MicroProfile TCKs Tests" path: | - **/target/*-reports/TEST-*.xml - target/build-report.json - **/target/gradle-build-scan-url.txt - LICENSE.txt + build-reports.zip retention-days: 7 native-tests: @@ -1042,17 +1088,22 @@ jobs: name: test-reports-native-${{matrix.category}} path: 'test-reports.tgz' retention-days: 7 - - name: Upload build reports (if build failed) + - name: Prepare build reports archive + if: always() + run: | + zip -R build-reports.zip \ + '**/target/*-reports/TEST-*.xml' \ + '**/build/test-results/test/TEST-*.xml' \ + 'target/build-report.json' \ + 'target/gradle-build-scan-url.txt' \ + LICENSE.txt + - name: Upload build reports uses: actions/upload-artifact@v3 if: always() with: name: "build-reports-Native Tests - ${{matrix.category}}" path: | - **/target/*-reports/TEST-*.xml - **/build/test-results/test/TEST-*.xml - target/build-report.json - **/target/gradle-build-scan-url.txt - LICENSE.txt + build-reports.zip retention-days: 7 build-report: From 396ecce711254264da70b1678b8ba0eaf19cfd8e Mon Sep 17 00:00:00 2001 From: Guillaume Smet <guillaume.smet@gmail.com> Date: Wed, 31 Jan 2024 16:59:36 +0100 Subject: [PATCH 5/5] Use 7z instead of zip as available on all platforms --- .github/workflows/ci-actions-incremental.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index 099f6abb57dc6..cf5383380c9a4 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -204,7 +204,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ 'target/build-report.json' \ 'target/gradle-build-scan-url.txt' \ LICENSE.txt @@ -389,7 +389,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ '**/target/*-reports/TEST-*.xml' \ 'target/build-report.json' \ 'target/gradle-build-scan-url.txt' \ @@ -498,7 +498,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ '**/target/*-reports/TEST-*.xml' \ 'target/build-report.json' \ 'target/gradle-build-scan-url.txt' \ @@ -582,7 +582,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ '**/build/test-results/test/TEST-*.xml' \ '**/target/*-reports/TEST-*.xml' \ 'target/build-report.json' \ @@ -674,7 +674,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ '**/target/*-reports/TEST-*.xml' \ 'target/build-report.json' \ 'target/gradle-build-scan-url.txt' \ @@ -765,7 +765,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ '**/target/*-reports/TEST-*.xml' \ 'target/build-report.json' \ 'target/gradle-build-scan-url.txt' \ @@ -835,7 +835,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ 'quarkus-quickstarts/**/target/*-reports/TEST-*.xml' \ 'quarkus-quickstarts/target/build-report.json' \ 'quarkus-quickstarts/LICENSE' \ @@ -906,7 +906,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ 'integration-tests/virtual-threads/**/target/*-reports/TEST-*.xml' \ 'integration-tests/virtual-threads/target/build-report.json' \ 'integration-tests/virtual-threads/target/gradle-build-scan-url.txt' \ @@ -986,7 +986,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ '**/target/*-reports/TEST-*.xml' \ 'target/build-report.json' \ 'target/gradle-build-scan-url.txt' \ @@ -1091,7 +1091,7 @@ jobs: - name: Prepare build reports archive if: always() run: | - zip -R build-reports.zip \ + 7z a -tzip build-reports.zip -r \ '**/target/*-reports/TEST-*.xml' \ '**/build/test-results/test/TEST-*.xml' \ 'target/build-report.json' \