diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc2fd543bb..3addc33777 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - name: Set up JDK for build and test uses: actions/setup-java@v2 with: @@ -26,25 +25,13 @@ jobs: - name: Checkout security uses: actions/checkout@v2 - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Package - uses: gradle/gradle-build-action@v2 - with: - arguments: clean build -Dbuild.snapshot=false -x test -x integrationTest - - - name: Test + - name: Clean Build and Test uses: gradle/gradle-build-action@v2 with: - arguments: test integrationTest + arguments: clean build -Dbuild.snapshot=false + arguments: -x spotlessCheck # Don't check for style issues, enforced in Code Hygiene workflow + arguments: -x checkstyleMain # Don't check for style issues, enforced in Code Hygiene workflow + arguments: -x checkstyleTest # Don't check for style issues, enforced in Code Hygiene workflow - name: Coverage uses: codecov/codecov-action@v1 @@ -63,6 +50,33 @@ jobs: if: always() run: echo "Check the artifact ${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports for detailed test results" + integration-tests: + name: build + strategy: + fail-fast: false + matrix: + jdk: [17] + platform: ["ubuntu-latest", "windows-latest", "macos-latest"] + runs-on: ${{ matrix.platform }} + + steps: + - name: Set up JDK for build and test + uses: actions/setup-java@v2 + with: + distribution: temurin # Temurin is a distribution of adoptium + java-version: ${{ matrix.jdk }} + + - name: Checkout security + uses: actions/checkout@v2 + + - name: Clean build and Test + uses: gradle/gradle-build-action@v2 + with: + arguments: clean integrationTest -Dbuild.snapshot=false + arguments: -x spotlessCheck # Don't check for style issues, enforced in Code Hygiene workflow + arguments: -x checkstyleMain # Don't check for style issues, enforced in Code Hygiene workflow + arguments: -x checkstyleTest # Don't check for style issues, enforced in Code Hygiene workflow + backward-compatibility: runs-on: ubuntu-latest steps: diff --git a/build.gradle b/build.gradle index bd8bc30eae..a629f99f8c 100644 --- a/build.gradle +++ b/build.gradle @@ -120,7 +120,7 @@ test { } retry { failOnPassedAfterRetry = false - // maxRetries = 5 + maxRetries = 5 } jacoco { excludes = [ @@ -278,20 +278,14 @@ sourceSets { } } -//add new task that runs integration tests +//add new task that runs integration tests, only runs when explictly called task integrationTest(type: Test) { description = 'Run integration tests.' group = 'verification' systemProperty "java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager" testClassesDirs = sourceSets.integrationTest.output.classesDirs classpath = sourceSets.integrationTest.runtimeClasspath - retry { - failOnPassedAfterRetry = false - maxRetries = 2 - maxFailures = 10 - } - //run the integrationTest task after the test task - shouldRunAfter test + } //run the integrationTest task before the check task @@ -376,12 +370,6 @@ dependencies { runtimeOnly 'org.apache.santuario:xmlsec:2.2.3' runtimeOnly 'com.github.luben:zstd-jni:1.5.0-2' runtimeOnly 'org.checkerframework:checker-qual:3.5.0' - // testRuntimeOnly 'io.netty:netty-tcnative:2.0.54.Final:windows-x86_64' - // runtimeOnly 'io.netty:netty-tcnative-boringssl-static:2.0.54.Final' - // testRuntimeOnly "io.netty:netty-all:${versions.netty}" - testRuntimeOnly 'io.netty:netty-tcnative-boringssl-static:2.0.54.Final:windows-x86_64' - - implementation 'org.apache.commons:commons-lang3:3.4' testImplementation "org.opensearch:common-utils:${common_utils_version}"