diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..8b1602f8949f395bb350781643863a41eee829e3 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +stages: + - 🧪 test + +variables: + MAVEN_OPTS: "-Dmaven.repo.local=./.m2/repository" + +cache: + paths: + - ./.m2/ + +test: + stage: 🧪 test + image: maven:3-jdk-11 + coverage: '/Total.*?([0-9]{1,3})%/' + script: + - mvn $MAVEN_OPTS test jacoco:report + - cat target/site/jacoco/index.html + diff --git a/pom.xml b/pom.xml index 9e1b49f24ea955eb54c9a1b14764e40ed7f5eed5..73cdb3325a84c143fe917f589e2d68ffd5b0ab26 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,19 @@ <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M5</version> </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.8.4</version> + <executions> + <execution> + <id>prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> <dependencies>