)"
- grep -irE "$SEARCH_REGEXP" target/pit-reports \
- | sed -E 's/.*\/([A-Za-z]+.java.html)/\1/' | LC_ALL=C sort > target/actual.txt
- printf "%s\n" "${ignored[@]}" | sed '/^$/d' | LC_ALL=C sort > target/ignored.txt
- if [ -n "$2" ] ; then
- local -n unstableMutations=$2
- printf "%s\n" "${unstableMutations[@]}" | sed '/^$/d' | LC_ALL=C sort > target/unstable.txt
- if grep -Fxf target/unstable.txt target/actual.txt > target/unstableMatching.txt ; then
- echo "Following unstable mutations were encountered:"
- cat target/unstableMatching.txt
- grep -xvFf target/unstableMatching.txt target/actual.txt > target/tempActual.txt
- cat target/tempActual.txt > target/actual.txt
- fi;
- fi;
- if [ "$(diff --unified -w target/ignored.txt target/actual.txt)" != "" ] ; then
- fail=1
- echo "Actual:" ;
- grep -irE "$SEARCH_REGEXP" target/pit-reports \
- | sed -E 's/.*\/([A-Za-z]+.java.html)/\1/' | sort
- echo "Ignore:" ;
- printf '%s\n' "${ignored[@]}"
- echo "Diff:"
- diff --unified -w target/ignored.txt target/actual.txt | cat
- fi;
- if [ "$fail" -ne "0" ]; then
- echo "Difference between 'Actual' and 'Ignore' lists is detected, lists should be equal."
- echo "build will be failed."
- fi
- sleep 5s
- exit $fail
-}
-###############################
-
-case $1 in
-
-pitest-annotation|pitest-design \
-|pitest-metrics|pitest-modifier|pitest-naming \
-|pitest-sizes|pitest-whitespace \
-|pitest-api|pitest-blocks \
-|pitest-packagenamesloader \
-|pitest-common-2|pitest-misc|pitest-xpath \
-|pitest-filters \
-|pitest-regexp \
-|pitest-meta \
-|pitest-tree-walker \
-|pitest-utils \
-|pitest-java-ast-visitor)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=();
- checkPitestReport ignoredItems
- ;;
-
-pitest-main)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "Main.java.html: } | "
- );
- checkPitestReport ignoredItems
- ;;
-
-pitest-header)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "RegexpHeaderCheck.java.html: isMatch = headerLineNo == headerSize | "
- "RegexpHeaderCheck.java.html: || isMatch(line, headerLineNo); | "
- );
- checkPitestReport ignoredItems
- ;;
-
-pitest-imports)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "ImportControlLoader.java.html: else if (ALLOW_ELEMENT_NAME.equals(qName) || "disallow".equals(qName)) { | "
- "PkgImportControl.java.html: if (regex || parent.regex) { | "
- "PkgImportControl.java.html: if (regex) { | "
- );
- checkPitestReport ignoredItems
- ;;
-
-pitest-common)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "Checker.java.html: if (cacheFile != null && cacheFile.isInCache(fileName, timestamp) | "
- "DefaultLogger.java.html: closeError = errorStreamOptions == OutputStreamOptions.CLOSE; | "
- "DefaultLogger.java.html: closeInfo = infoStreamOptions == OutputStreamOptions.CLOSE; | "
- "DefaultLogger.java.html: if (closeError) { | "
- "DefaultLogger.java.html: if (closeInfo) { | "
- "DefaultLogger.java.html: if (severityLevel != SeverityLevel.IGNORE) { | "
- "PackageObjectFactory.java.html: if (instance == null | "
- "PackageObjectFactory.java.html: if (!name.contains(PACKAGE_SEPARATOR)) { | "
- "PackageObjectFactory.java.html: if (thirdPartyNameToFullModuleNames == null) { | "
- );
- checkPitestReport ignoredItems
- ;;
-
-
-pitest-ant)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "CheckstyleAntTask.java.html: if (toFile == null || !useFile) { | "
- "CheckstyleAntTask.java.html: if (toFile == null || !useFile) { | "
- "CheckstyleAntTask.java.html: log("To process the files took " + (processingEndTime - processingStartTime) | "
- "CheckstyleAntTask.java.html: log("Total execution took " + (endTime - startTime) + TIME_SUFFIX, | "
- "CheckstyleAntTask.java.html: log("To locate the files took " + (endTime - startTime) + TIME_SUFFIX, | "
- );
- checkPitestReport ignoredItems
- ;;
-
-pitest-indentation)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "AbstractExpressionHandler.java.html: && curNode.getColumnNo() < realStart.getColumnNo()) { | "
- "AbstractExpressionHandler.java.html: if (colNum == null || thisLineColumn < colNum) { | "
- "AbstractExpressionHandler.java.html: if (toTest.getColumnNo() < first.getColumnNo()) { | "
- "BlockParentHandler.java.html: return getIndentCheck().getLineWrappingIndentation(); | "
- "CommentsIndentationCheck.java.html: && root.getFirstChild().getFirstChild().getFirstChild().getNextSibling() != null; | "
- "CommentsIndentationCheck.java.html: if (isUsingOfObjectReferenceToInvokeMethod(blockBody)) { | "
- "CommentsIndentationCheck.java.html: if (isUsingOfObjectReferenceToInvokeMethod(root)) { | "
- "CommentsIndentationCheck.java.html: if (root.getFirstChild().getType() == TokenTypes.LITERAL_NEW) { | "
- "CommentsIndentationCheck.java.html: if (root.getLineNo() >= comment.getLineNo()) { | "
- "CommentsIndentationCheck.java.html: return root.getFirstChild().getFirstChild().getFirstChild() != null | "
- "HandlerFactory.java.html: createdHandlers.clear(); | "
- "HandlerFactory.java.html: register(TokenTypes.INDEX_OP, IndexHandler.class); | "
- "IndentationCheck.java.html: handlerFactory.clearCreatedHandlers(); | "
- "IndentationCheck.java.html: handlers.clear(); | "
- "IndentationCheck.java.html: primordialHandler.checkIndentation(); | "
- "MethodDefHandler.java.html: if (node.getLineNo() < lineStart) { | "
- "NewHandler.java.html: return false; | "
- "SwitchHandler.java.html: checkExpressionSubtree( | "
- "SwitchHandler.java.html: checkSwitchExpr(); | "
- "SynchronizedHandler.java.html: checkExpressionSubtree(syncAst, expected, false, false); | "
- "SynchronizedHandler.java.html: checkSynchronizedExpr(); | "
- "SynchronizedHandler.java.html: checkWrappingIndentation(getMainAst(), | "
- "TryHandler.java.html: checkTryResParen(getTryResLparen(), "lparen"); | "
- );
- checkPitestReport ignoredItems
- ;;
-
-pitest-javadoc)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "AbstractJavadocCheck.java.html: beginJavadocTree(root); | "
- "AbstractJavadocCheck.java.html: finishJavadocTree(root); | "
- "TagParser.java.html: while (column < currentLineLength | "
- );
- checkPitestReport ignoredItems
- ;;
-
-pitest-coding-1)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "UnnecessaryParenthesesCheck.java.html: || parent.getType() != TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR) { | "
- "UnnecessaryParenthesesCheck.java.html: else if (type != TokenTypes.ASSIGN | "
- "UnnecessaryParenthesesCheck.java.html: if (firstChild != null && firstChild.getType() == TokenTypes.LPAREN) { | "
- "UnnecessaryParenthesesCheck.java.html: if (type != TokenTypes.ASSIGN | "
- "UnnecessaryParenthesesCheck.java.html: if (type == TokenTypes.LAMBDA && isLambdaSingleParameterSurrounded(ast)) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: && currentAst.getType() != TokenTypes.RCURLY) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: && currentNode.getType() == TokenTypes.LITERAL_CATCH) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: && currentStatementAst.getType() != TokenTypes.RCURLY) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: else if (isChild(currentNode, variable)) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: if (currentNode.getType() == TokenTypes.LITERAL_IF) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: if (curNode.getType() == ast.getType() && curNode.getText().equals(ast.getText())) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: if (currentNodeType == TokenTypes.SLIST) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: if (!firstUsageFound) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: if (!isVarInOperatorDeclaration && operator.getType() == TokenTypes.LITERAL_IF) { | "
- "VariableDeclarationUsageDistanceCheck.java.html: while (result | "
- );
- checkPitestReport ignoredItems
- ;;
-
-pitest-coding-2)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "FinalLocalVariableCheck.java.html: && isSameVariables(storedVariable, variable) | "
- "FinalLocalVariableCheck.java.html: == ast.getParent()) { | "
- "FinalLocalVariableCheck.java.html: if (ast.getParent().getType() == TokenTypes.SWITCH_RULE | "
- "FinalLocalVariableCheck.java.html: if (astIterator.getType() == childType | "
- "FinalLocalVariableCheck.java.html: result = findLastChildWhichContainsSpecifiedToken( | "
- "FinalLocalVariableCheck.java.html: return ast.getType() == TokenTypes.LITERAL_IF | "
- "FinalLocalVariableCheck.java.html: return loop1 != null && loop1 == loop2; | "
- "HiddenFieldCheck.java.html: && ast.getType() == TokenTypes.PARAMETER_DEF) { | "
- "HiddenFieldCheck.java.html: && firstChild.getType() == TokenTypes.IDENT) { | "
- "HiddenFieldCheck.java.html: && methodAST.getType() == TokenTypes.METHOD_DEF | "
- "HiddenFieldCheck.java.html: if (method.getType() == TokenTypes.METHOD_DEF) { | "
- "HiddenFieldCheck.java.html: if (ignoreSetter && ast.getType() == TokenTypes.PARAMETER_DEF) { | "
- "HiddenFieldCheck.java.html: if (type == TokenTypes.CLASS_DEF | "
- "IllegalInstantiationCheck.java.html: && illegal.startsWith(JAVA_LANG)) { | "
- "OneStatementPerLineCheck.java.html: && currentStatement.getPreviousSibling().getType() == TokenTypes.RESOURCES; | "
- "OneStatementPerLineCheck.java.html: currentStatement.getPreviousSibling() != null | "
- "OneStatementPerLineCheck.java.html: if (countOfSemiInLambda.isEmpty()) { | "
- "OneStatementPerLineCheck.java.html: multiline = !TokenUtil.areOnSameLine(prevSibling, ast) | "
- "OneStatementPerLineCheck.java.html: if (!hasResourcesPrevSibling && isMultilineStatement(currentStatement)) { | "
- );
- checkPitestReport ignoredItems
- ;;
-
-pitest-coding-require-this-check)
- mvn -e --no-transfer-progress -P"$1" clean test-compile org.pitest:pitest-maven:mutationCoverage;
- declare -a ignoredItems=(
- "RequireThisCheck.java.html: && ast.getParent().getType() != TokenTypes.LITERAL_CATCH) { | "
- "RequireThisCheck.java.html: if (isAnonymousClassDef(ast)) { | "
- "RequireThisCheck.java.html: if (toVisit == null) { | "
- "RequireThisCheck.java.html: && parent.getType() != TokenTypes.CTOR_DEF | "
- "RequireThisCheck.java.html: && lastChild.getType() == TokenTypes.OBJBLOCK; | "
- "RequireThisCheck.java.html: if (definitionToken.getType() == TokenTypes.STATIC_INIT) { | "
- "RequireThisCheck.java.html: if (variableDeclarationFrame.getType() == FrameType.CLASS_FRAME) { | "
- "RequireThisCheck.java.html: if (fieldUsageFrame.getType() == FrameType.BLOCK_FRAME) { | "
- "RequireThisCheck.java.html: if (sibling != null && isAssignToken(parent.getType())) { | "
- "RequireThisCheck.java.html: return left.getType() == right.getType() && left.getText().equals(right.getText()); | "
- );
- checkPitestReport ignoredItems
- ;;
-
-# pitesttyle-gui)
-# mvn -e -P$1 clean test-compile org.pitest:pitest-maven:mutationCoverage;
-# # post validation is skipped, we do not test gui throughly
-# ;;
-
---list)
- echo "Supported profiles:"
- pomXmlPath="$(dirname "${0}")/../pom.xml"
- sed -n -e 's/^.*\(pitest-[^<]\+\)<\/id>.*$/\1/p' < "${pomXmlPath}" | sort
- ;;
-
-*)
- if [[ -n "$1" ]]; then
- echo "Unexpected argument: $*"
- fi
- echo "Usage $0 "
- echo "To see the full list of supported profiles run '$0 --list'"
- sleep 5s
- false
- ;;
-
-esac
-
-
diff --git a/.github/workflows/pitest.yml b/.github/workflows/pitest.yml
index f41f83722bc8..ef80e7e64e3e 100644
--- a/.github/workflows/pitest.yml
+++ b/.github/workflows/pitest.yml
@@ -7,706 +7,68 @@ on:
pull_request:
jobs:
- pitest-annotation:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-annotation
- run: |
- ./.ci/pitest.sh pitest-annotation
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-annotation-coverage-report
- path: staging
- retention-days: 7
-
- pitest-ant:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-ant
- run: |
- ./.ci/pitest.sh pitest-ant
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-ant-coverage-report
- path: staging
- retention-days: 7
-
- pitest-api:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-api
- run: |
- ./.ci/pitest.sh pitest-api
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-api-coverage-report
- path: staging
- retention-days: 7
-
- pitest-blocks:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-blocks
- run: |
- ./.ci/pitest.sh pitest-blocks
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-blocks-coverage-report
- path: staging
- retention-days: 7
-
- pitest-coding-1:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-Coding-1
- run: |
- ./.ci/pitest.sh pitest-coding-1
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-coding-1-coverage-report
- path: staging
- retention-days: 7
-
- pitest-coding-2:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-Coding-2
- run: |
- ./.ci/pitest.sh pitest-coding-2
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-coding-2-coverage-report
- path: staging
- retention-days: 7
-
- pitest-coding-require-this-check:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-Coding-require-this-check
- run: |
- ./.ci/pitest.sh pitest-coding-require-this-check
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-coding-require-this-check-coverage-report
- path: staging
- retention-days: 7
-
- pitest-common:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-common
- run: |
- ./.ci/pitest.sh pitest-common
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-common-coverage-report
- path: staging
- retention-days: 7
-
- pitest-common-2:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-common-2
- run: |
- ./.ci/pitest.sh pitest-common-2
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-common-2-coverage-report
- path: staging
- retention-days: 7
-
- pitest-design:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-design
- run: |
- ./.ci/pitest.sh pitest-design
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-design-coverage-report
- path: staging
- retention-days: 7
-
- pitest-filters:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-filters
- run: |
- ./.ci/pitest.sh pitest-filters
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-filters-coverage-report
- path: staging
- retention-days: 7
-
- pitest-header:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-header
- run: |
- ./.ci/pitest.sh pitest-header
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-header-coverage-report
- path: staging
- retention-days: 7
-
- pitest-imports:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-imports
- run: |
- ./.ci/pitest.sh pitest-imports
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-imports-coverage-report
- path: staging
- retention-days: 7
-
- pitest-indentation:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-indentation
- run: |
- ./.ci/pitest.sh pitest-indentation
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-indentation-coverage-report
- path: staging
- retention-days: 7
-
- pitest-javadoc:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-javadoc
- run: |
- ./.ci/pitest.sh pitest-javadoc
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-javadoc-coverage-report
- path: staging
- retention-days: 7
-
- pitest-main:
- runs-on: ubuntu-latest
- steps:
- - name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- java-version: 11
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-main
- run: |
- ./.ci/pitest.sh pitest-main
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-main-coverage-report
- path: staging
- retention-days: 7
-
- pitest-metrics:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-metrics
- run: |
- ./.ci/pitest.sh pitest-metrics
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-metrics-coverage-report
- path: staging
- retention-days: 7
-
- pitest-misc:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-misc
- run: |
- ./.ci/pitest.sh pitest-misc
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-misc-coverage-report
- path: staging
- retention-days: 7
-
- pitest-modifier:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-modifier
- run: |
- ./.ci/pitest.sh pitest-modifier
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-modifier-coverage-report
- path: staging
- retention-days: 7
-
- pitest-naming:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-naming
- run: |
- ./.ci/pitest.sh pitest-naming
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-naming-coverage-report
- path: staging
- retention-days: 7
-
- pitest-packagenamesloader:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-packagenamesloader
- run: |
- ./.ci/pitest.sh pitest-packagenamesloader
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-packagenamesloader-coverage-report
- path: staging
- retention-days: 7
-
- pitest-regexp:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-regexp
- run: |
- ./.ci/pitest.sh pitest-regexp
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-regexp-coverage-report
- path: staging
- retention-days: 7
-
- pitest-sizes:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-sizes
- run: |
- ./.ci/pitest.sh pitest-sizes
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-sizes-coverage-report
- path: staging
- retention-days: 7
-
- pitest-tree-walker:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-tree-walker
- run: |
- ./.ci/pitest.sh pitest-tree-walker
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-tree-walker-coverage-report
- path: staging
- retention-days: 7
-
- pitest-utils:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-utils
- run: |
- ./.ci/pitest.sh pitest-utils
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-utils-coverage-report
- path: staging
- retention-days: 7
-
- pitest-whitespace:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-whitespace
- run: |
- ./.ci/pitest.sh pitest-whitespace
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-whitespace-coverage-report
- path: staging
- retention-days: 7
-
- pitest-xpath:
- runs-on: ubuntu-latest
- steps:
- - name: Setup local maven cache
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- - name: Checkout
- uses: actions/checkout@v2
- - name: pitest-xpath
- run: |
- ./.ci/pitest.sh pitest-xpath
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-xpath-coverage-report
- path: staging
- retention-days: 7
-
- pitest-java-ast-visitor:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- ref: ${{ github.event.pull_request.head.sha }}
- - name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- java-version: 11
-
- - name: Generate pitest report
- run: ./.ci/pitest.sh pitest-java-ast-visitor
- - name: Stage results
- if: failure() || github.ref == 'refs/heads/master'
- run: |
- mkdir staging && cp -r target/pit-reports/ staging
- - name: Archive code coverage results
- if: failure() || github.ref == 'refs/heads/master'
- uses: actions/upload-artifact@v2
- with:
- name: pitest-report-java-ast-visitor
- path: staging
- retention-days: 7
+ pitest:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ profile: [ pitest-annotation,
+ pitest-ant, pitest-api,
+ pitest-blocks,
+ pitest-coding-1,
+ pitest-coding-2,
+ pitest-coding-require-this-check,
+ pitest-common,
+ pitest-common-2,
+ pitest-design,
+ pitest-filters,
+ pitest-header,
+ pitest-imports,
+ pitest-indentation,
+ pitest-javadoc,
+ pitest-main,
+ pitest-metrics,
+ pitest-misc,
+ pitest-modifier,
+ pitest-naming,
+ pitest-packagenamesloader,
+ pitest-regexp,
+ pitest-sizes,
+ pitest-tree-walker,
+ pitest-utils,
+ pitest-whitespace,
+ pitest-xpath,
+ pitest-java-ast-visitor ]
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - name: Install Groovy 4.0.3
+ run: |
+ GROOVY_LINK="https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-binary-4.0.3.zip"
+ wget -O ${{ runner.temp }}/groovy.zip $GROOVY_LINK;
+ unzip ${{ runner.temp }}/groovy.zip -d ${{ runner.temp }};
+ mv ${{ runner.temp }}/groovy-4.0.3 ${{ runner.temp }}/groovy
+ GROOVY_HOME=${{ runner.temp }}/groovy
+ echo "GROOVY_HOME=${{ runner.temp }}/groovy" >> $GITHUB_ENV
+ echo "$GROOVY_HOME/bin" >> $GITHUB_PATH
+ - name: Setup local maven cache
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: pitest-${{ matrix.profile }}
+ run: |
+ groovy ./.ci/pitest.groovy ${{ matrix.profile }}
+ - name: Stage results
+ if: failure() || github.ref == 'refs/heads/master'
+ run: |
+ mkdir staging && cp -r target/pit-reports/ staging
+ - name: Archive code coverage results
+ if: failure() || github.ref == 'refs/heads/master'
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ matrix.profile }}-coverage-report
+ path: staging
+ retention-days: 7
diff --git a/config/checkstyle_non_main_files_suppressions.xml b/config/checkstyle_non_main_files_suppressions.xml
index 1fa3e6ec94b2..43608c4b52b3 100644
--- a/config/checkstyle_non_main_files_suppressions.xml
+++ b/config/checkstyle_non_main_files_suppressions.xml
@@ -87,6 +87,9 @@
+
+
+
diff --git a/pom.xml b/pom.xml
index 4081c73f37aa..78a4d43e44c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,6 +216,7 @@
11
1.8.0
10
+ HTML,XML
50000
4
0.16
@@ -2384,6 +2385,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2428,6 +2430,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2472,6 +2475,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2561,6 +2565,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2663,6 +2668,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2707,6 +2713,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2751,6 +2758,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2795,6 +2803,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2839,6 +2848,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2884,6 +2894,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2938,6 +2949,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -2982,6 +2994,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3026,6 +3039,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3070,6 +3084,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3114,6 +3129,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3158,6 +3174,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3202,6 +3219,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3247,6 +3265,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3288,6 +3307,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3373,6 +3393,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3435,6 +3456,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3476,6 +3498,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3569,6 +3592,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3626,6 +3650,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3672,6 +3697,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3781,6 +3807,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3825,6 +3852,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3899,6 +3927,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}
@@ -3944,6 +3973,7 @@
${pitest.plugin.timeout.factor}
${pitest.plugin.timeout.constant}
${pitest.plugin.threads}
+ ${pitest.plugin.output.formats}