File tree Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 99      no-build-cache :
1010        type : boolean 
1111        required : false 
12+       max-test-retries :
13+         type : number 
14+         required : false 
15+         default : 0 
1216
1317permissions :
1418  contents : read 
9094          "-PtestJavaVersion=${{ matrix.test-java-version }}" 
9195          "-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }}" 
9296          "-Porg.gradle.java.installations.auto-download=false" 
97+           "-PmaxTestRetries=${{ inputs.max-test-retries }}" 
9398          ${{ inputs.no-build-cache && '--no-build-cache' || '' }} 
9499
95100integration-test :
@@ -109,7 +114,7 @@ jobs:
109114          cache-read-only : ${{ inputs.cache-read-only }} 
110115
111116      - name : Integration test 
112-         run : ./gradlew integrationTest ${{ inputs.no-build-cache && '--no-build-cache' || '' }} 
117+         run : ./gradlew integrationTest "-PmaxTestRetries=${{ inputs.max-test-retries }}"  ${{ inputs.no-build-cache && '--no-build-cache' || '' }} 
113118
114119      - name : Save integration test results 
115120        uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02  #  v4.6.2
Original file line number Diff line number Diff line change 1616    uses : ./.github/workflows/build-common.yml 
1717    with :
1818      cache-read-only : true 
19+       #  retry in merge queue to avoid unnecessary failures
20+       max-test-retries : ${{ github.event_name == 'merge_group' && 5 || 0 }} 
1921
2022  link-check :
2123    uses : ./.github/workflows/reusable-link-check.yml 
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ dependencies {
1717  implementation(" net.ltgt.gradle:gradle-nullaway-plugin:2.2.0" 
1818  implementation(" org.owasp:dependency-check-gradle:12.1.3" 
1919  implementation(" ru.vyarus.animalsniffer:ru.vyarus.animalsniffer.gradle.plugin:2.0.1" 
20+   implementation(" com.gradle:develocity-gradle-plugin:4.1.1" 
2021}
2122
2223spotless {
Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ tasks {
6666  withType<Test >().configureEach {
6767    useJUnitPlatform()
6868
69+     val  maxTestRetries =  gradle.startParameter.projectProperties[" maxTestRetries" ? :  0 
70+     develocity.testRetry {
71+       //  You can see tests that were retried by this mechanism in the collected test reports and build scans.
72+       maxRetries.set(maxTestRetries)
73+     }
74+ 
6975    testLogging {
7076      exceptionFormat =  TestExceptionFormat .FULL 
7177      showStandardStreams =  true 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments