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
18 changes: 13 additions & 5 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ jobs:
issues: write # To create an issue if check fails on push.
runs-on: ubuntu-latest
timeout-minutes: 130
strategy:
fail-fast: false
matrix:
include:
- label: check
gradle_check_command: 'check -Dtests.coverage=true'
- label: bwc
gradle_check_command: 'bwcTestSnapshots -Dbwc.buildUnreleasedFromSource=false'
steps:
- name: Checkout OpenSearch repo
uses: actions/checkout@v6
Expand Down Expand Up @@ -128,7 +136,7 @@ jobs:
run: |
set -e
set -o pipefail
bash opensearch-build/scripts/gradle/gradle-check.sh -t ${{ secrets.JENKINS_GRADLE_CHECK_GENERIC_WEBHOOK_TOKEN }} -u ${{ secrets.JENKINS_GITHUB_USER}} -p ${{ secrets.JENKINS_GITHUB_USER_TOKEN}} | tee -a gradle-check.log
bash opensearch-build/scripts/gradle/gradle-check.sh -t ${{ secrets.JENKINS_GRADLE_CHECK_GENERIC_WEBHOOK_TOKEN }} -u ${{ secrets.JENKINS_GITHUB_USER}} -p ${{ secrets.JENKINS_GITHUB_USER_TOKEN}} -c "${{ matrix.gradle_check_command }}" | tee -a gradle-check.log

- name: Setup Result Status
if: always()
Expand All @@ -139,7 +147,7 @@ jobs:
echo "result=$RESULT" >> $GITHUB_ENV

- name: Upload Coverage Report
if: success()
if: success() && matrix.label == 'check'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -151,7 +159,7 @@ jobs:
with:
issue-number: ${{ env.pr_number }}
body: |
:white_check_mark: Gradle check result for ${{ env.pr_from_sha }}: [${{ env.result }}](${{ env.workflow_url }})
:white_check_mark: Build result for **${{ matrix.label }}** (${{ env.pr_from_sha }}): [${{ env.result }}](${{ env.workflow_url }})

- name: Extract Test Failure
if: ${{ github.event_name == 'pull_request_target' && env.result != 'SUCCESS' }}
Expand All @@ -174,7 +182,7 @@ jobs:
with:
issue-number: ${{ env.pr_number }}
body: |
:grey_exclamation: Gradle check result for ${{ env.pr_from_sha }}: [${{ env.result }}](${{ env.workflow_url }}) ${{ env.test_failures }}
:grey_exclamation: Build result for **${{ matrix.label }}** (${{ env.pr_from_sha }}): [${{ env.result }}](${{ env.workflow_url }}) ${{ env.test_failures }}

Please review all [flaky tests](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Expand All @@ -184,7 +192,7 @@ jobs:
with:
issue-number: ${{ env.pr_number }}
body: |
:x: Gradle check result for ${{ env.pr_from_sha }}: [${{ env.result }}](${{ env.workflow_url }})
:x: Build result for **${{ matrix.label }}** (${{ env.pr_from_sha }}): [${{ env.result }}](${{ env.workflow_url }})

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?

Expand Down
4 changes: 0 additions & 4 deletions gradle/bwc-test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,4 @@ tasks.withType(Test).configureEach {
onlyIf { project.bwc_tests_enabled }
}

tasks.named("check").configure {
dependsOn(bwcTestSnapshots)
}

tasks.findByName("test")?.enabled = false
Loading