Skip to content

Commit 878b609

Browse files
committed
Enabling CodeCov
1 parent db6bd82 commit 878b609

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
path: ~/.m2/repository
3030
key: ${{ hashFiles('**/pom.xml') }}
3131
- name: Launching tests with Maven
32-
run: mvn test -pl '!tests/activedirectory-integration,!tests/mongo-integration,!tests/regression'
32+
run: |
33+
mvn test -B -pl '!tests/activedirectory-integration,!tests/mongo-integration,!tests/regression' jacoco:report
34+
bash <(curl -s https://codecov.io/bash)
3335
3436
mongodb-integration-tests:
3537
runs-on: ubuntu-latest
@@ -48,12 +50,12 @@ jobs:
4850
mongodb-version: 4.0
4951
- name: Launching tests with Maven
5052
run: |
51-
mvn install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Djacoco.skip=true
52-
mvn spring-boot:run -pl bootstrap -Dspring.profiles.active=mongo,noldap &
53+
mvn install -B -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Djacoco.skip=true
54+
mvn spring-boot:run -B -pl bootstrap -Dspring.profiles.active=mongo,noldap &
5355
mongo hesperides mongo_create_collections.js
5456
# Give some time for the application to start:
5557
sleep 30
56-
mvn -pl tests/mongo-integration verify
58+
mvn -B -pl tests/mongo-integration verify
5759
5860
docker-build:
5961
runs-on: ubuntu-latest

.gitignore

100755100644
File mode changed.

LICENSE.txt

100755100644
File mode changed.

README.md

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Hesperides backend
22

33
[![Build, test and publish](https://github.com/voyages-sncf-technologies/hesperides/workflows/Build,%20test%20and%20publish/badge.svg)](https://github.com/voyages-sncf-technologies/hesperides/actions?query=branch%3Amaster)
4+
[![codecov](https://codecov.io/gh/voyages-sncf-technologies/hesperides/branch/master/graph/badge.svg)](https://codecov.io/gh/voyages-sncf-technologies/hesperides)
45

56
[![](https://img.shields.io/github/contributors/voyages-sncf-technologies/hesperides.svg)](https://github.com/voyages-sncf-technologies/hesperides/graphs/contributors)
67
[![](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com)

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,25 @@
414414
<useDefaultDelimiters>false</useDefaultDelimiters>
415415
</configuration>
416416
</plugin>
417+
<plugin>
418+
<groupId>org.jacoco</groupId>
419+
<artifactId>jacoco-maven-plugin</artifactId>
420+
<version>0.8.7</version>
421+
<executions>
422+
<execution>
423+
<goals>
424+
<goal>prepare-agent</goal>
425+
</goals>
426+
</execution>
427+
<execution>
428+
<id>report</id>
429+
<phase>test</phase>
430+
<goals>
431+
<goal>report</goal>
432+
</goals>
433+
</execution>
434+
</executions>
435+
</plugin>
417436
</plugins>
418437
<pluginManagement>
419438
<plugins>
@@ -423,6 +442,8 @@
423442
<configuration>
424443
<finalName>hesperides-${project.version}</finalName>
425444
<classifier>app</classifier>
445+
<!-- Pass $argLine variable set by Jacoco: -->
446+
<jvmArguments>${argLine}</jvmArguments>
426447
</configuration>
427448
<dependencies>
428449
<dependency>

0 commit comments

Comments
 (0)