Skip to content

Commit

Permalink
chore(test) Add pitest for mutation testing
Browse files Browse the repository at this point in the history
- 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 hcoles/pitest#622 and hcoles/pitest#621)
  => using a temporary fix
- Add coverage report in codecov
- Run mutation tests in CircleCI
- Generate site and documentation in CircleCI
  • Loading branch information
aurelien-baudet committed Jun 24, 2019
1 parent 96d2f43 commit 4f22e1e
Show file tree
Hide file tree
Showing 21 changed files with 728 additions and 128 deletions.
57 changes: 57 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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" }}
- persist_to_workspace:
root: .
paths:
- target
deploy:
docker:
- image: circleci/node:7.10
steps:
- attach_workspace:
at: .
- run: npm install surge
- run: ./node_modules/surge/lib/cli.js --project ./target/surge --domain ogham-documentation.surge.sh
notify:
docker:
- image: circleci/node:7.10
steps:
- slack/status:
success_message: "*[success]* ${CIRCLE_JOB} Documentation and reports:
* <http://ogham-documentation.surge.sh/${CIRCLE_BRANCH}/index.html|Generated site>
* <http://ogham-documentation.surge.sh/${CIRCLE_BRANCH}/jacoco-aggregate/index.html|JaCoCo>
* <https://codecov.io/gh/groupe-sii/ogham/branch/${CIRCLE_BRANCH}|Codecov>
* <http://ogham-documentation.surge.sh/${CIRCLE_BRANCH}/pit-reports/index.html|Mutation testing>"
workflows:
generate-documentation:
jobs:
- build
- deploy:
requires:
- build
- notify:
requires:
- deploy
5 changes: 3 additions & 2 deletions .externalToolBuilders/asciidoctor.launch
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/ogham/pom.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;item path=&quot;/ogham/src/docs&quot; type=&quot;2&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/ogham/src/docs&quot; type=&quot;2&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/ogham/mvnw}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="auto,"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dmaven.site.skip&#10;post-site&#10;-N"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="post-site&#10;-N&#10;-Dmaven.site.skip&#10;-Dsass.skip=true"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/ogham}"/>
</launchConfiguration>
1 change: 1 addition & 0 deletions .externalToolBuilders/compile sass.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="true"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/ogham/src/site/scss&quot; type=&quot;2&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/ogham/mvnw}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="auto,"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/ogham/pom.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;item path=&quot;/ogham/src/docs&quot; type=&quot;2&quot;/&gt;&#10;&lt;item path=&quot;/ogham/src/site/asciidoc&quot; type=&quot;2&quot;/&gt;&#10;&lt;item path=&quot;/ogham/src/site/resources&quot; type=&quot;2&quot;/&gt;&#10;&lt;item path=&quot;/ogham/src/site/site.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/ogham/pom.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;item path=&quot;/ogham/src/site/asciidoc&quot; type=&quot;2&quot;/&gt;&#10;&lt;item path=&quot;/ogham/src/site/resources&quot; type=&quot;2&quot;/&gt;&#10;&lt;item path=&quot;/ogham/src/site/site.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/ogham/mvnw}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="auto,"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="clean post-site -N&#10;-DgenerateProjectInfo=false&#10;-DgenerateReports=false&#10;-DgenerateSitemap=false&#10;-Dmaven.javadoc.skip=true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="post-site -N&#10;-DgenerateProjectInfo=false&#10;-DgenerateReports=false&#10;-DgenerateSitemap=false&#10;-Dmaven.javadoc.skip=true&#10;-Dmpir.skip=true&#10;-Dasciidoctor.skip=true&#10;-Dsass.skip=true"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/ogham}"/>
</launchConfiguration>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ target/
.asciidoctor/
.idea/
src/docs/asciidoc/*.png
.attach_pid*
Loading

0 comments on commit 4f22e1e

Please sign in to comment.