Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/build-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
no-build-cache:
type: boolean
required: false
max-test-retries:
type: number
required: false
default: 0

permissions:
contents: read
Expand Down Expand Up @@ -90,6 +94,7 @@ jobs:
"-PtestJavaVersion=${{ matrix.test-java-version }}"
"-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }}"
"-Porg.gradle.java.installations.auto-download=false"
"-PmaxTestRetries=${{ inputs.max-test-retries }}"
${{ inputs.no-build-cache && '--no-build-cache' || '' }}

integration-test:
Expand All @@ -109,7 +114,7 @@ jobs:
cache-read-only: ${{ inputs.cache-read-only }}

- name: Integration test
run: ./gradlew integrationTest ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
run: ./gradlew integrationTest "-PmaxTestRetries=${{ inputs.max-test-retries }}" ${{ inputs.no-build-cache && '--no-build-cache' || '' }}

- name: Save integration test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
uses: ./.github/workflows/build-common.yml
with:
cache-read-only: true
# retry in merge queue to avoid unnecessary failures
max-test-retries: ${{ github.event_name == 'merge_group' && 5 || 0 }}

link-check:
uses: ./.github/workflows/reusable-link-check.yml
Expand Down
1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies {
implementation("net.ltgt.gradle:gradle-nullaway-plugin:2.2.0")
implementation("org.owasp:dependency-check-gradle:12.1.3")
implementation("ru.vyarus.animalsniffer:ru.vyarus.animalsniffer.gradle.plugin:2.0.1")
implementation("com.gradle:develocity-gradle-plugin:4.1.1")
}

spotless {
Expand Down
6 changes: 6 additions & 0 deletions buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ tasks {
withType<Test>().configureEach {
useJUnitPlatform()

val maxTestRetries = gradle.startParameter.projectProperties["maxTestRetries"]?.toInt() ?: 0
develocity.testRetry {
// You can see tests that were retried by this mechanism in the collected test reports and build scans.
maxRetries.set(maxTestRetries)
}

testLogging {
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
Expand Down
Loading