diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index 25e0387cf3..4fa5f4e1a6 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -44,6 +44,12 @@ jobs: - name: Build with Gradle run: ./gradlew --continue build ${{ matrix.entry.os_build_args }} + - name: PiTest with Gradle + run: | + ./gradlew :core:pitest + ./gradlew :opensearch:pitest + + - name: Run backward compatibility tests if: ${{ matrix.entry.os == 'ubuntu-latest' }} run: ./scripts/bwctest.sh diff --git a/core/build.gradle b/core/build.gradle index eb70f110d1..a2b476a749 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -26,6 +26,7 @@ plugins { id 'java-library' id "io.freefair.lombok" id 'jacoco' + id 'info.solidsoft.pitest' version '1.9.0' } repositories { @@ -38,6 +39,16 @@ repositories { // } //} +pitest { + targetClasses = ['org.opensearch.sql.*'] + pitestVersion = '1.9.0' + threads = 4 + outputFormats = ['HTML', 'XML'] + timestampedReports = false + junit5PluginVersion = '1.0.0' + mutationThreshold = 85 +} + dependencies { api group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' api group: 'org.springframework', name: 'spring-context', version: "${spring_version}" diff --git a/opensearch/build.gradle b/opensearch/build.gradle index 7ad7d63546..cf5b5465c2 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -26,6 +26,7 @@ plugins { id 'java-library' id "io.freefair.lombok" id 'jacoco' + id 'info.solidsoft.pitest' version '1.9.0' } dependencies { @@ -47,6 +48,16 @@ dependencies { testImplementation group: 'org.opensearch.test', name: 'framework', version: "${opensearch_version}" } +pitest { + targetClasses = ['org.opensearch.sql.*'] + pitestVersion = '1.9.0' + threads = 4 + outputFormats = ['HTML', 'XML'] + timestampedReports = false + junit5PluginVersion = '1.0.0' + mutationThreshold = 70 +} + test { useJUnitPlatform() testLogging {