From c386928033ed584215e11f08fecc463616f4bda9 Mon Sep 17 00:00:00 2001 From: abaudet Date: Fri, 14 Jun 2019 16:50:25 +0400 Subject: [PATCH] chore(test) Add pitest for mutation testing - Add profiles to run mutation tests - Generate mutation reports for each module - TODO: mutation tests for Spring Boot modules fail - report aggregation doesn't work for now (see https://github.com/hcoles/pitest/issues/622 and https://github.com/hcoles/pitest/issues/621) => using a temporary fix - Add coverage report in codecov - Run mutation tests in CircleCI - Generate site and documentation in CircleCI --- .attach_pid6482 | 0 .circleci/config.yml | 37 ++ .externalToolBuilders/asciidoctor.launch | 5 +- .externalToolBuilders/compile sass.launch | 1 + ...launch => site [target][no-report].launch} | 4 +- .travis.yml | 294 +++++++++++---- ci/analyze.sh | 7 + ci/build.sh | 3 + ci/detect-java-release.sh | 8 + ci/generate-classpath-tests.sh | 20 ++ ci/generate-documentation.sh | 14 + ci/generate-javadoc.sh | 3 + ci/run-classpath-tests.sh | 3 + ci/run-integration-tests.sh | 3 + ci/run-unit-tests.sh | 3 + ogham-core/pom.xml | 1 - .../bean/SimpleBeanReadWrapperSpec.groovy | 1 + ogham-email-javamail/.attach_pid32458 | 0 ogham-template-thymeleaf-v2/.attach_pid28104 | 0 ogham-template-thymeleaf-v3/.attach_pid32265 | 0 pom.xml | 334 +++++++++++++++--- reporting/pom.xml | 65 +++- src/site/site.xml | 9 +- 23 files changed, 687 insertions(+), 128 deletions(-) create mode 100644 .attach_pid6482 create mode 100644 .circleci/config.yml rename .externalToolBuilders/{site [target].launch => site [target][no-report].launch} (67%) create mode 100755 ci/analyze.sh create mode 100755 ci/build.sh create mode 100755 ci/detect-java-release.sh create mode 100755 ci/generate-classpath-tests.sh create mode 100755 ci/generate-documentation.sh create mode 100755 ci/generate-javadoc.sh create mode 100755 ci/run-classpath-tests.sh create mode 100755 ci/run-integration-tests.sh create mode 100755 ci/run-unit-tests.sh create mode 100644 ogham-email-javamail/.attach_pid32458 create mode 100644 ogham-template-thymeleaf-v2/.attach_pid28104 create mode 100644 ogham-template-thymeleaf-v3/.attach_pid32265 diff --git a/.attach_pid6482 b/.attach_pid6482 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..811a01c8cd --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,37 @@ +version: 2.1 +orbs: + slack: circleci/slack@3.2.0 +jobs: + build: + docker: + - image: circleci/openjdk:8-jdk + steps: + - checkout + - restore_cache: + keys: + # when lock file changes, use increasingly general patterns to restore cache + - maven-repo-v1-{{ .Branch }}-{{ checksum "pom.xml" }} + - maven-repo-v1-{{ .Branch }}- + - maven-repo-v1- + - run: ci/./generate-documentation.sh + - run: rm -rf ~/.m2/repository/fr/sii + - save_cache: + paths: + - ~/.m2 + key: maven-repo-v1-{{ .Branch }}-{{ checksum "pom.xml" }} + - slack/status: + success_message: "[success] ${CIRCLE_JOB} Documentation and reports: + + * + + * + + * + + * " + deploy: + docker: + - image: circleci/node:7.10 + steps: + - run: npm install surge + - run: ./node_modules/surge/lib/cli.js --project ./target/surge --domain ogham-documentation.surge.sh diff --git a/.externalToolBuilders/asciidoctor.launch b/.externalToolBuilders/asciidoctor.launch index 57fb8f3242..44a1f8be7a 100644 --- a/.externalToolBuilders/asciidoctor.launch +++ b/.externalToolBuilders/asciidoctor.launch @@ -1,10 +1,11 @@ - + + - + diff --git a/.externalToolBuilders/compile sass.launch b/.externalToolBuilders/compile sass.launch index 09167ca136..b5eb54bf6b 100644 --- a/.externalToolBuilders/compile sass.launch +++ b/.externalToolBuilders/compile sass.launch @@ -1,6 +1,7 @@ + diff --git a/.externalToolBuilders/site [target].launch b/.externalToolBuilders/site [target][no-report].launch similarity index 67% rename from .externalToolBuilders/site [target].launch rename to .externalToolBuilders/site [target][no-report].launch index 217252139f..b5324402ff 100644 --- a/.externalToolBuilders/site [target].launch +++ b/.externalToolBuilders/site [target][no-report].launch @@ -1,10 +1,10 @@ - + - + diff --git a/.travis.yml b/.travis.yml index e4c46cc5c4..ac5714815f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,5 @@ language: java dist: trusty -jdk: - - oraclejdk9 - - openjdk9 - - oraclejdk8 - - openjdk8 - - openjdk10 - - oraclejdk11 - - openjdk11 - #- oraclejdk12 - - openjdk12 sudo: required addons: apt: @@ -17,83 +7,243 @@ addons: - graphviz sonarcloud: organization: aurelien-baudet-github - branches: - - master - - refactoring/.* - - features/.* - - test/.* branches: except: - gh-.* - + + before_install: - - echo "MAVEN_OPTS='-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m'" > ~/.mavenrc # see https://github.com/travis-ci/travis-ci/issues/4613 - set -o pipefail - # detect current Java version in order to execute classpath tests only for this version - - | - java_version=$(java -version 2>&1 | grep -i version | cut -d'"' -f2) - major=$(echo $java_version | cut -d'.' -f1) - [ "1" = "$major" ] \ - && echo "$java_version" | cut -d'.' -f2 > "$HOME/java-version.info" \ - || echo "$java_version" | cut -d'.' -f1 > "$HOME/java-version.info" - - JAVA_RELEASE_VERSION=$(cat "$HOME/java-version.info") - # start spring initializr for Ogham in background - - | - touch "$HOME/spring-initializr.log" - spring-initializr/./mvnw clean spring-boot:run -f spring-initializr > "$HOME/spring-initializr.log" & - echo "$!" > "$HOME/spring-initializr.pid" - tail -f "$HOME/spring-initializr.log" & - - grep -q 'Started SpringInitializrApplication' <(tail -f "$HOME/spring-initializr.log") - - cat "$HOME/spring-initializr.log" - - | - [ "$JAVA_RELEASE_VERSION" != "8" ] && exit 0 - touch "$HOME/spring-initializr-older-versions.log" - spring-initializr/./mvnw clean spring-boot:run -f spring-initializr -Dspring-boot.version=1.5.21.RELEASE -Dspring-initializr.version=0.4.0.RELEASE -Drun.jvmArguments="-Dspring.profiles.active=older-versions" > "$HOME/spring-initializr-older-versions.log" & - echo "$!" > "$HOME/spring-initializr-older-versions.pid" - tail -f "$HOME/spring-initializr-older-versions.log" & - - grep -q 'Started SpringInitializrApplication' <(tail -f "$HOME/spring-initializr-older-versions.log") - - cat "$HOME/spring-initializr-older-versions.log" - # generate projects used to test the classpath on the current Ogham version - - OGHAM_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) - # TODO: it seems that parallel execution sometimes fails on Travis (seems to be spring-initializr that fails, why ?) - - ./mvnw spring-boot:run -pl :ogham-test-classpath -Dspring-boot.run.arguments="$HOME/classpath-tests" -Dspring-boot.run.jvmArguments="-Drunner.parallel=false -Dogham-version=$OGHAM_VERSION -Dspring.initializer.url=http://localhost:8050/starter.zip" - - | - [ "$JAVA_RELEASE_VERSION" != "8" ] && exit 0 - ./mvnw spring-boot:run -pl :ogham-test-classpath -Dspring-boot.run.arguments="$HOME/classpath-tests" -Dspring-boot.run.jvmArguments="-Drunner.parallel=false -Dogham-version=$OGHAM_VERSION -Dspring.profiles.active=older-versions -Dspring.initializer.url=http://localhost:8052/starter.zip" - - ls -l "$HOME" - - ls -l "$HOME/classpath-tests" - # stop spring initializr - - kill `cat "$HOME/spring-initializr.pid"` || echo "" - - kill `cat "$HOME/spring-initializr-older-versions.pid"` || echo "" - - TEST_FOLDER=$(echo "JAVA_$JAVA_RELEASE_VERSION") - - echo $TEST_FOLDER - - ls -l "$HOME/classpath-tests/$TEST_FOLDER" -script: - - ./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true -Dskip.integration.tests=true -Dskip.unit.tests=true -B -q - - ./mvnw test verify -Dmaven.test.redirectTestOutputToFile=true -fae -B -q - - ./mvnw javadoc:javadoc -fae -B | grep -Ei '(error|warn)' - # execute generated classpath tests for the right java version - - $HOME/classpath-tests/$TEST_FOLDER/./mvnw test -T 2.5C -f "$HOME/classpath-tests/$TEST_FOLDER/pom.xml" -Dmaven.test.redirectTestOutputToFile=true -fae -q -B #| grep -Ei '(error|exception|Tests run:)' -after_success: - - ./mvnw sonar:sonar -B | grep -Ei '(warn|error|ANALYSIS SUCCESSFUL)' - - ./mvnw deploy --settings .travis-settings.xml -DskipTests=true -B | grep -Ei '(Uploading|Downloading|Uploaded|Downloaded)' -# TODO: after error -> grab logs and send it -after_failure: - - cat "$HOME/spring-initializr.log" - - cat "$HOME/spring-initializr-older-versions.log" + +jobs: + include: + - stage: "Build" + jdk: oraclejdk8 + script: + - ci/./build.sh + - stage: "Build" + jdk: openjdk8 + script: + - ci/./build.sh + - stage: "Build" + jdk: oraclejdk9 + script: + - ci/./build.sh + - stage: "Build" + jdk: openjdk9 + script: + - ci/./build.sh + - stage: "Build" + jdk: openjdk10 + script: + - ci/./build.sh + - stage: "Build" + jdk: oraclejdk11 + script: + - ci/./build.sh + - stage: "Build" + jdk: openjdk11 + script: + - ci/./build.sh + - stage: "Build" + jdk: openjdk12 + script: + - ci/./build.sh + + - stage: test + name: "Unit Tests (oraclejdk8)" + jdk: oraclejdk8 + script: ci/./run-unit-tests.sh + - stage: test + name: "Unit Tests (openjdk8)" + jdk: openjdk8 + script: ci/./run-unit-tests.sh + - stage: test + name: "Unit Tests (oraclejdk9)" + jdk: oraclejdk9 + script: ci/./run-unit-tests.sh + - stage: test + name: "Unit Tests (openjdk9)" + jdk: openjdk9 + script: ci/./run-unit-tests.sh + - stage: test + name: "Unit Tests (openjdk10)" + jdk: openjdk10 + script: ci/./run-unit-tests.sh + - stage: test + name: "Unit Tests (oraclejdk11)" + jdk: oraclejdk11 + script: ci/./run-unit-tests.sh + - stage: test + name: "Unit Tests (openjdk11)" + jdk: openjdk11 + script: ci/./run-unit-tests.sh + - stage: test + name: "Unit Tests (openjdk12)" + jdk: openjdk12 + script: ci/./run-unit-tests.sh + + - stage: test + name: "Integration Tests (oraclejdk8)" + jdk: oraclejdk8 + script: ci/./run-integration-tests.sh + - stage: test + name: "Integration Tests (openjdk8)" + jdk: openjdk8 + script: ci/./run-integration-tests.sh + - stage: test + name: "Integration Tests (oraclejdk9)" + jdk: oraclejdk9 + script: ci/./run-integration-tests.sh + - stage: test + name: "Integration Tests (openjdk9)" + jdk: openjdk9 + script: ci/./run-integration-tests.sh + - stage: test + name: "Integration Tests (openjdk10)" + jdk: openjdk10 + script: ci/./run-integration-tests.sh + - stage: test + name: "Integration Tests (oraclejdk11)" + jdk: oraclejdk11 + script: ci/./run-integration-tests.sh + - stage: test + name: "Integration Tests (openjdk11)" + jdk: openjdk11 + script: ci/./run-integration-tests.sh + - stage: test + name: "Integration Tests (openjdk12)" + jdk: openjdk12 + script: ci/./run-integration-tests.sh + + - stage: test + name: "Classpath Tests (oraclejdk8)" + jdk: oraclejdk8 + script: + - TEST_FOLDER=JAVA_8 INITIALIZER_NAME=spring-initializr INITIALIZER_PORT=8050 ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_8 INITIALIZER_NAME=spring-initializr-older-versions INITIALIZER_PORT=8052 INITIALIZER_ARGS='-Dspring-boot.version=1.5.21.RELEASE -Dspring-initializr.version=0.4.0.RELEASE -Drun.jvmArguments="-Dspring.profiles.active=older-versions"' GENERATION_ARGS="-Dspring.profiles.active=older-versions" ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_8 ci/./run-classpath-tests.sh + - stage: test + name: "Classpath Tests (openjdk8)" + jdk: openjdk8 + script: + - TEST_FOLDER=JAVA_8 INITIALIZER_NAME=spring-initializr INITIALIZER_PORT=8050 ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_8 INITIALIZER_NAME=spring-initializr-older-versions INITIALIZER_PORT=8052 INITIALIZER_ARGS='-Dspring-boot.version=1.5.21.RELEASE -Dspring-initializr.version=0.4.0.RELEASE -Drun.jvmArguments="-Dspring.profiles.active=older-versions"' GENERATION_ARGS="-Dspring.profiles.active=older-versions" ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_8 ci/./run-classpath-tests.sh + - stage: test + name: "Classpath Tests (oraclejdk9)" + jdk: oraclejdk9 + script: + - TEST_FOLDER=JAVA_9 INITIALIZER_NAME=spring-initializr INITIALIZER_PORT=8050 ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_9 ci/./run-classpath-tests.sh + - stage: test + name: "Classpath Tests (openjdk9)" + jdk: openjdk9 + script: + - TEST_FOLDER=JAVA_9 INITIALIZER_NAME=spring-initializr INITIALIZER_PORT=8050 ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_9 ci/./run-classpath-tests.sh + - stage: test + name: "Classpath Tests (openjdk10)" + jdk: openjdk10 + script: + - TEST_FOLDER=JAVA_10 INITIALIZER_NAME=spring-initializr INITIALIZER_PORT=8050 ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_10 ci/./run-classpath-tests.sh + - stage: test + name: "Classpath Tests (oraclejdk11)" + jdk: oraclejdk11 + script: + - TEST_FOLDER=JAVA_11 INITIALIZER_NAME=spring-initializr INITIALIZER_PORT=8050 ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_11 ci/./run-classpath-tests.sh + - stage: test + name: "Classpath Tests (openjdk11)" + jdk: openjdk11 + script: + - TEST_FOLDER=JAVA_11 INITIALIZER_NAME=spring-initializr INITIALIZER_PORT=8050 ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_11 ci/./run-classpath-tests.sh + - stage: test + name: "Classpath Tests (openjdk12)" + jdk: openjdk12 + script: + - TEST_FOLDER=JAVA_12 INITIALIZER_NAME=spring-initializr INITIALIZER_PORT=8050 ci/./generate-classpath-tests.sh + - TEST_FOLDER=JAVA_12 ci/./run-classpath-tests.sh + + - stage: "Analyze" + jdk: oraclejdk8 + script: + - ci/./analyze.sh + + - stage: "Javadoc" + jdk: oraclejdk8 + script: + - ci/./generate-javadoc.sh + - stage: "Javadoc" + jdk: openjdk8 + script: + - ci/./generate-javadoc.sh + - stage: "Javadoc" + jdk: oraclejdk9 + script: + - ci/./generate-javadoc.sh + - stage: "Javadoc" + jdk: openjdk9 + script: + - ci/./generate-javadoc.sh + - stage: "Javadoc" + jdk: openjdk10 + script: + - ci/./generate-javadoc.sh + - stage: "Javadoc" + jdk: oraclejdk11 + script: + - ci/./generate-javadoc.sh + - stage: "Javadoc" + jdk: openjdk11 + script: + - ci/./generate-javadoc.sh + - stage: "Javadoc" + jdk: openjdk12 + script: + - ci/./generate-javadoc.sh + +# - stage: "Documentation" +# jdk: oraclejdk8 +# script: +# - travis_wait 30 ci/./generate-documentation.sh +# deploy: +# skip_cleanup: true +# provider: surge +# project: target/surge +# domain: ogham-documentation.surge.sh +# on: +# all_branches: true + + - stage: "Deploy" + jdk: oraclejdk8 + script: + - ./mvnw clean install deploy --settings .travis-settings.xml -DskipTests=true -B | grep -Ei '(Uploading|Downloading|Uploaded|Downloaded)' +# + +stages: + - "Build" + - test + - "Javadoc" + - "Analyze" + - "Documentation" + - "Deploy" + notifications: slack: rooms: - secure: NdaSwFJ16HC93H1iimYB07/0rGwQfVCto2/XLrVJNeMcvdRsHbuhBnKwwUkNCTLeLLtB1DVmoNeCBdo2pmtAvoyTnl9OXhG3GWjoB++Al+/66x/TzC1g891y59JI/F7btVqZRKMi5URdcXt7VqSTUyu3Qjf6rxxeRMfiCgg4eLP2ABWQTvNpi7AgV9ArkVqat5Fo1p98iuxpUL0kByXmyuoN15f0azVm0Mhwv2LtMyHAf5Lq1gKOt7TfKccMEJaZXPZMfFWkXblZUWggx6EYXB2ylXJ7e45UeunsroqPYuXJtepwOjcT00NSm7tR+wDaVZl3hXDfexwb35wP+g/tcIiQYTWgQQvr5b6Z0tUX3WgZt7aBMH9gaJPRolC7FXwukXkdBwjvyDLsra147M2pm7fc5zj73TV0gaEdqDewd+UgFA12Vm1gwC0eWH/HVhOZ0HGOQdYmtYkZJ67KTwes9B+SKDkrSF4Nq7T3svOWvGxzDCaw4CCOBY5U1xRc3VVOo/xtFa8dAKfxpo0IFy/qaHS4vIb2BDHJ0LU7+WarcjcmADxJXvhvOvvByS5k0sqkUXF4uB+QpxQqQEGNMzLC2iMog0UnBIIEZEe6pvrzchoQIpKyom4GvnAi+Xco8aJaMgrLZY9JwmlLP8r1YFyMawH4kmJ8XpPZ5+fIN2HSkD4= template: - - "[%{result}] %{branch}" + - "*[%{result}]* %{branch}" - "Build: <%{build_url}|#%{build_number}> (%{duration})" - "Commit: <%{compare_url}|%{commit}> by %{author}" - "%{commit_message}" cache: directories: -# - $HOME/classpath-tests - $HOME/.m2 before_cache: - - rm -rf $HOME/.m2/repository/fr/sii \ No newline at end of file + - rm -rf $HOME/.m2/repository/fr/sii + \ No newline at end of file diff --git a/ci/analyze.sh b/ci/analyze.sh new file mode 100755 index 0000000000..19b4c65438 --- /dev/null +++ b/ci/analyze.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Sonar +./mvnw clean install sonar:sonar -Dmaven.test.redirectTestOutputToFile=true -B | grep -Ei '(warn|error|ANALYSIS SUCCESSFUL)' + +# Codecov +bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/ci/build.sh b/ci/build.sh new file mode 100755 index 0000000000..7d16bc3c45 --- /dev/null +++ b/ci/build.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true -Dskip.integration.tests=true -Dskip.unit.tests=true -B -q diff --git a/ci/detect-java-release.sh b/ci/detect-java-release.sh new file mode 100755 index 0000000000..ece2fef34a --- /dev/null +++ b/ci/detect-java-release.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +java_version=$(java -version 2>&1 | grep -i version | cut -d'"' -f2) +major=$(echo $java_version | cut -d'.' -f1) +[ "1" = "$major" ] \ + && echo "$java_version" | cut -d'.' -f2 > "$HOME/java-version.info" \ + || echo "$java_version" | cut -d'.' -f1 > "$HOME/java-version.info" +JAVA_RELEASE_VERSION=$(cat "$HOME/java-version.info") \ No newline at end of file diff --git a/ci/generate-classpath-tests.sh b/ci/generate-classpath-tests.sh new file mode 100755 index 0000000000..e7f6bf1f10 --- /dev/null +++ b/ci/generate-classpath-tests.sh @@ -0,0 +1,20 @@ +#!/bin/sh + + +# start Spring Initializr +touch "$HOME/$INITIALIZER_NAME.log" +spring-initializr/./mvnw clean spring-boot:run -f spring-initializr > "$HOME/$INITIALIZER_NAME.log" & +echo "$!" > "$HOME/$INITIALIZER_NAME.pid" +# tail -f "$HOME/$INITIALIZER_NAME.log" & +(tail -f "$HOME/$INITIALIZER_NAME.log" &) | grep -q 'Started SpringInitializrApplication' + +# Generate projects +OGHAM_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) +./mvnw spring-boot:run -pl :ogham-test-classpath -Dspring-boot.run.arguments="$HOME/classpath-tests" -Dspring-boot.run.jvmArguments="-Drunner.parallel=false -Dogham-version=$OGHAM_VERSION -Dspring.initializer.url=http://localhost:$INITIALIZER_PORT/starter.zip $GENERATION_ARGS" + +ls -l "$HOME" +ls -l "$HOME/classpath-tests" +ls -l "$HOME/classpath-tests/$TEST_FOLDER" + +kill `cat "$HOME/$INITIALIZER_NAME.pid"` || echo "" + diff --git a/ci/generate-documentation.sh b/ci/generate-documentation.sh new file mode 100755 index 0000000000..deabd21b8b --- /dev/null +++ b/ci/generate-documentation.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# build pitest fix report aggregation fix +git clone --branch fix/report-aggregation https://github.com/aurelien-baudet/pitest.git $HOME/pitest +mvn clean install -DskipTests -f $HOME/pitest -q -B > $HOME/pitest-build.log + + +./mvnw clean install post-site -Pmutation-testing -Dmaven.test.redirectTestOutputToFile=true -Dsurefire.useSystemClassLoader=false -Dfailsafe.useSystemClassLoader=false -B + +# copy generated site and reports to a specific folder for deployment +mkdir -p target/surge/$CIRCLE_BRANCH +cp -r target/site/* target/surge/$CIRCLE_BRANCH diff --git a/ci/generate-javadoc.sh b/ci/generate-javadoc.sh new file mode 100755 index 0000000000..f5e3cd4962 --- /dev/null +++ b/ci/generate-javadoc.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./mvnw clean install javadoc:javadoc -Dmaven.test.redirectTestOutputToFile=true -fae -B | grep -Ei '(error|warn)' diff --git a/ci/run-classpath-tests.sh b/ci/run-classpath-tests.sh new file mode 100755 index 0000000000..c20a5e9ab7 --- /dev/null +++ b/ci/run-classpath-tests.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +$HOME/classpath-tests/$TEST_FOLDER/./mvnw test -T 2.5C -f "$HOME/classpath-tests/$TEST_FOLDER/pom.xml" -Dmaven.test.redirectTestOutputToFile=true -fae -q -B #| grep -Ei '(error|exception|Tests run:)' \ No newline at end of file diff --git a/ci/run-integration-tests.sh b/ci/run-integration-tests.sh new file mode 100755 index 0000000000..80c8dc7a94 --- /dev/null +++ b/ci/run-integration-tests.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./mvnw verify -Dmaven.test.redirectTestOutputToFile=true -fae -B -q \ No newline at end of file diff --git a/ci/run-unit-tests.sh b/ci/run-unit-tests.sh new file mode 100755 index 0000000000..f4d96754e7 --- /dev/null +++ b/ci/run-unit-tests.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./mvnw test -Dmaven.test.redirectTestOutputToFile=true -fae -B -q \ No newline at end of file diff --git a/ogham-core/pom.xml b/ogham-core/pom.xml index 9ac6a9569f..64cdbe04b3 100644 --- a/ogham-core/pom.xml +++ b/ogham-core/pom.xml @@ -77,5 +77,4 @@ test - diff --git a/ogham-core/src/test/groovy/fr/sii/ogham/it/core/util/bean/SimpleBeanReadWrapperSpec.groovy b/ogham-core/src/test/groovy/fr/sii/ogham/it/core/util/bean/SimpleBeanReadWrapperSpec.groovy index e69de29bb2..16dde32340 100644 --- a/ogham-core/src/test/groovy/fr/sii/ogham/it/core/util/bean/SimpleBeanReadWrapperSpec.groovy +++ b/ogham-core/src/test/groovy/fr/sii/ogham/it/core/util/bean/SimpleBeanReadWrapperSpec.groovy @@ -0,0 +1 @@ +package fr.sii.ogham.it.core.util.bean diff --git a/ogham-email-javamail/.attach_pid32458 b/ogham-email-javamail/.attach_pid32458 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ogham-template-thymeleaf-v2/.attach_pid28104 b/ogham-template-thymeleaf-v2/.attach_pid28104 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ogham-template-thymeleaf-v3/.attach_pid32265 b/ogham-template-thymeleaf-v3/.attach_pid32265 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pom.xml b/pom.xml index 383e1d50ff..957c02c2f6 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,8 @@ 2.23.2 1.3 1.3-groovy-2.5 + 3.4.0-01 + 2.5.7-01 1.5.16 1.5.6 @@ -73,17 +75,20 @@ false false + + ${project.basedir}/../target/site/pit-reports + ${project.basedir}/../target/coverage-reports/jacoco-it.exec ${project.basedir}/../target/coverage-reports/jacoco-ut.exec ${project.basedir}/../target/coverage-reports/jacoco-all.exec ${project.basedir}/../target/site/jacoco-aggregate - + ${project.build.directory}/surefire-reports,${project.build.directory}/failsafe-reports - ${jacoco.ut.execution.data.file},${jacoco.it.execution.data.file} java jacoco + ${jacoco.report.path}/jacoco.xml https://github.com/groupe-sii/ogham @@ -100,15 +105,22 @@ ${project.build.outputDirectory}/staging ${site.staging.dir}/v${docProjectVersion} cerulean + ${maven.site.skip} + ${maven.site.skip} 2.10 3.8.1 3.1.0 + 3.0.0 + 1.0.0 0.8.4 2.22.2 2.22.2 + + 1.4.9-SNAPSHOT + 1.3.7 3.7 3.0.0 @@ -583,6 +595,12 @@ surefireArgLine + + generate-xml-report + + report + + pre-integration-test @@ -592,6 +610,12 @@ failsafeArgLine + + generate-xml-integration-report + + report-integration + + @@ -709,6 +733,7 @@ copy-resources + ${asciidoctor.skip} src/docs/resources @@ -724,6 +749,7 @@ copy-resources + ${asciidoctor.skip} target/generated-docs @@ -807,6 +833,7 @@ unpack + ${maven.site.skip} io.github.devacfr.maven.skins @@ -875,6 +902,7 @@ run + ${maven.site.skip} @@ -915,6 +943,7 @@ + ${sass.skip} @@ -1058,47 +1087,40 @@ <ogham.version>${project.version}</ogham.version> - - + - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.gmavenplus - - - gmavenplus-plugin - - - [0.0,) - - - addSources - compile - addTestSources - compileTests - - - - - true - - - - - - + eu.stamp-project + pitmp-maven-plugin + ${pitmp-maven-plugin.version} + + + run-mutation-testing + site + + run + + + descartes + + ogham-spring-boot-autoconfigure + ogham-spring-boot-starter-all + ogham-spring-boot-starter-email + ogham-spring-boot-starter-sms + ogham-spring-boot-common-autoconfigure + + + HTML + XML + + true + + + + + + org.pitest + pitest-maven + ${pitest-maven.version} @@ -1140,6 +1162,34 @@ report-integration + + + report-aggregate + + false + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + + + summary + licenses + modules + team + scm + issue-management + dependencies + dependency-info + dependency-convergence + dependency-management + plugins + + @@ -1220,6 +1270,206 @@ 8 + + mutation-testing + + + + + eu.stamp-project + pitmp-maven-plugin + + + + + + + + + + + + + + + + + + + + + + + + mutation-testing-only + + true + true + true + true + false + false + false + true + true + + + + + + eu.stamp-project + pitmp-maven-plugin + + + + + + + + + + + + + + + + + + + + + + + + mutation-testing-aggregate-report-only + + true + true + true + true + false + false + false + true + true + + + + eclipse + + + + + + org.eclipse.m2e + lifecycle-mapping + ${lifecycle-mapping.version} + + + + + + + org.codehaus.gmavenplus + + + gmavenplus-plugin + + + [0.0,) + + + addSources + compile + addTestSources + compileTests + + + + + true + + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build-helper-maven-plugin.version} + + + add-test-source + + add-test-source + + + + src/test/groovy + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${maven.compiler.source} + ${maven.compiler.target} + ${project.build.sourceEncoding} + + + + default-compile + compile + + compile + + + + + + + + default-testCompile + test-compile + + testCompile + + + groovy-eclipse-compiler + + + + + + org.codehaus.groovy + groovy-eclipse-compiler + ${groovy-eclipse-compiler.version} + + + org.codehaus.groovy + groovy-eclipse-batch + ${groovy-eclipse-batch.version} + + + + + + diff --git a/reporting/pom.xml b/reporting/pom.xml index 86ecb4a2e1..9fb613c4dd 100644 --- a/reporting/pom.xml +++ b/reporting/pom.xml @@ -171,19 +171,14 @@ report - site + verify report-aggregate - - fr/sii/ogham/test/classpath/** - *mvnwrapper-for-projects/** - - ${jacoco.report.path} @@ -191,5 +186,63 @@ + + + + + org.pitest + pitest-maven + + + merge-pitest-reports + site + + report-aggregate + + + ${pit.report.path} + + + + + + + + + + mutation-testing + + + + org.pitest + pitest-maven + + + + + + mutation-testing-only + + + + org.pitest + pitest-maven + + + + + + mutation-testing-aggregate-report-only + + + + org.pitest + pitest-maven + + + + + + \ No newline at end of file diff --git a/src/site/site.xml b/src/site/site.xml index 1dae1a5d65..38de8aaf93 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -44,7 +44,7 @@ Main Download|Contribute Documentation - reports + Reports|Maven Reports - @@ -203,6 +202,10 @@ - + + + + + \ No newline at end of file