Skip to content

Commit

Permalink
Merge pull request quarkusio#38485 from gsmet/ci-adjustments
Browse files Browse the repository at this point in the history
Retry tests when they fail to fight flaky tests
  • Loading branch information
gsmet authored Feb 2, 2024
2 parents dfe434e + 396ecce commit 35c60b8
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/quarkus-github-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workflows:
- "**/*.md"
- "**/*.adoc"
workflowRunAnalysis:
workflows: ["Quarkus CI"]
workflows: ["Quarkus CI", "Quarkus Documentation CI"]
projectsClassic:
rules:
- labels: [area/documentation]
Expand Down
169 changes: 110 additions & 59 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'target/build-report.json' \
'target/gradle-build-scan-url.txt' \
LICENSE.txt
- name: Upload build reports
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
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:
Expand Down Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'**/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: ${{ failure() || cancelled() }}
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
Expand Down Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'**/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: ${{ failure() || cancelled() }}
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:
Expand Down Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'**/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: ${{ failure() || cancelled() }}
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:
Expand Down Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'**/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: ${{ failure() || cancelled() }}
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:
Expand Down Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'**/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: ${{ failure() || cancelled() }}
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:
Expand Down Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'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: ${{ failure() || cancelled() }}
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:
Expand Down Expand Up @@ -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: |
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' \
LICENSE.txt
- name: Upload build reports
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
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:
Expand Down Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'**/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: ${{ failure() || cancelled() }}
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:
Expand Down Expand Up @@ -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: |
7z a -tzip build-reports.zip -r \
'**/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: ${{ failure() || cancelled() }}
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:
Expand Down
14 changes: 14 additions & 0 deletions independent-projects/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 35c60b8

Please sign in to comment.