From 3c3f3b431293efa0d60cbbcf014b227428a0c3d2 Mon Sep 17 00:00:00 2001 From: Leo Galambos Date: Tue, 14 Apr 2026 02:01:30 +0200 Subject: [PATCH] feat: PIT report added --- .github/workflows/pages.yml | 7 ++++++- build.gradle | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index fbceeae..6daaf0a 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -37,7 +37,7 @@ jobs: uses: gradle/actions/setup-gradle@v4 - name: Build reports for publication - run: ./gradlew --no-daemon clean build pmdMain javadoc jacocoTestReport + run: ./gradlew --no-daemon clean build pmdMain javadoc jacocoTestReport pitest - name: Prepare gh-pages worktree shell: bash @@ -80,6 +80,9 @@ jobs: cp -R build/reports/jacoco/test/html "${RUN_DIR}/coverage" cp -R build/reports/jacoco/test/html "${LATEST_DIR}/coverage" + cp -R build/reports/pitest "${RUN_DIR}/pitest" + cp -R build/reports/pitest "${LATEST_DIR}/pitest" + if [ -d "build/reports/jmh" ]; then cp -R build/reports/jmh "${RUN_DIR}/jmh" cp -R build/reports/jmh "${LATEST_DIR}/jmh" @@ -111,6 +114,7 @@ jobs:
  • Test Report
  • PMD Report
  • Coverage Report
  • +
  • Mutation Testing Report
  • $( [ "${HAS_JMH}" = "true" ] && echo '
  • Benchmark Report
  • ' || echo '
  • Benchmark Report: not available in this build
  • ' )

    Open latest report set

    @@ -153,6 +157,7 @@ jobs:
  • Test Report
  • PMD Report
  • Coverage Report
  • +
  • Mutation Testing Report
  • EOF if [ "${HAS_JMH}" = "true" ]; then diff --git a/build.gradle b/build.gradle index 59e6dd7..90bb2e7 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id 'application' id 'pmd' id 'jacoco' + id 'info.solidsoft.pitest' version '1.19.0' id 'com.palantir.git-version' version '4.0.0' } @@ -78,6 +79,27 @@ tasks.named('check') { dependsOn(tasks.named('jacocoTestReport')) } +pitest { + pitestVersion = '1.22.1' + junit5PluginVersion = '1.2.3' + + targetClasses = [ + 'org.egothor.stemmer.*', + 'org.egothor.stemmer.trie.*' + ] + targetTests = [ + 'org.egothor.stemmer.*Test', + 'org.egothor.stemmer.trie.*Test' + ] + + excludedClasses = ['org.egothor.stemmer.Compile'] + outputFormats = ['XML', 'HTML'] + timestampedReports = false + exportLineCoverage = true + failWhenNoMutations = true + threads = Math.max(1, Runtime.runtime.availableProcessors().intdiv(2)) +} + application { mainClass = 'org.egothor.stemmer.Compile' }