From: David ‘Bombe’ Roden Date: Sat, 23 Nov 2024 12:25:24 +0000 (+0100) Subject: 💚 Add mutation testing and parallel stages to build X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=refs%2Fheads%2Fnext;p=jFCPlib.git 💚 Add mutation testing and parallel stages to build --- diff --git a/Jenkinsfile b/Jenkinsfile index 7360cda..b6092d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,23 +38,37 @@ pipeline { archiveArtifacts artifacts: 'target/jFCPlib-*.jar', fingerprint: true } } - stage('Compatibility (Java 17)') { - tools { - jdk 'OpenJDK 17' - } - steps { - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh './mvnw clean verify' + stage('Compatibility & Mutation Tests') { + parallel { + stage('Mutation Tests (Java 8)') { + tools { + jdk 'OpenJDK 8' + } + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh './mvnw clean test-compile org.pitest:pitest-maven:mutationCoverage' + } + } } - } - } - stage('Compatibility (Java 21)') { - tools { - jdk 'OpenJDK 21' - } - steps { - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh './mvnw clean verify' + stage('Compatibility (Java 17)') { + tools { + jdk 'OpenJDK 17' + } + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh './mvnw clean verify' + } + } + } + stage('Compatibility (Java 21)') { + tools { + jdk 'OpenJDK 21' + } + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh './mvnw clean verify' + } + } } } } diff --git a/pom.xml b/pom.xml index bf34759..1ee0912 100644 --- a/pom.xml +++ b/pom.xml @@ -124,6 +124,11 @@ maven-surefire-plugin 3.2.2 + + org.pitest + pitest-maven + 1.17.1 +