File tree 2 files changed +36
-11
lines changed
2 files changed +36
-11
lines changed Original file line number Diff line number Diff line change @@ -113,15 +113,22 @@ jobs:
113
113
wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp
114
114
tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt
115
115
echo "${M2_HOME}/bin" >> $GITHUB_PATH
116
+
117
+ # To ensure docker containers are fully up and running we sleep 60s
118
+ - name : Before script
119
+ run : |
120
+ source src/main/docker/env.bash
121
+ docker compose -f src/main/docker/docker-compose.yml up -d mongodb mongodb-auth rabbitmq eiffel-er mail-server
122
+ sleep 60
116
123
117
- - name : Run cobertura
124
+ - name : Run jacoco
118
125
shell : bash
119
126
run : |
120
- mvn cobertura:cobertura -Dcobertura.report.format=xml -B
127
+ mvn -V -B -U clean test -DskipITs -Dsurefire.rerunFailingTestsCount=2 -Djasypt.encryptor.password=secret -Dspring.config.location=src/functionaltests/resources/application.properties jacoco:report -Dformats=xml
121
128
122
129
# Generating test coverage report and publishing to Codacy
123
130
- name : Run report coverage
124
131
uses : codacy/codacy-coverage-reporter-action@v1
125
132
with :
126
133
project-token : 571cdd20d4bf435f84b25d806d304792
127
- coverage-reports : target/site/cobertura/coverage .xml
134
+ coverage-reports : target/site/jacoco/jacoco .xml
Original file line number Diff line number Diff line change 664
664
<groupId >org.jacoco</groupId >
665
665
<artifactId >jacoco-maven-plugin</artifactId >
666
666
<version >0.8.8</version >
667
- <configuration >
668
- <excludes >
669
- <exclude >com/ericsson/ei/controller/model/*</exclude >
670
- </excludes >
671
- </configuration >
672
667
<executions >
673
668
<execution >
674
- <id >jacoco-initialize </id >
669
+ <id >prepare-agent </id >
675
670
<goals >
676
671
<goal >prepare-agent</goal >
677
672
</goals >
678
673
</execution >
679
674
<execution >
680
- <id >jacoco-site </id >
681
- <phase >package</phase >
675
+ <id >report </id >
676
+ <phase >prepare- package</phase >
682
677
<goals >
683
678
<goal >report</goal >
684
679
</goals >
685
680
</execution >
681
+ <execution >
682
+ <id >post-unit-test</id >
683
+ <phase >test</phase >
684
+ <goals >
685
+ <goal >report</goal >
686
+ </goals >
687
+ <configuration >
688
+ <!-- Sets the path to the file which contains
689
+ the execution data. -->
690
+ <dataFile >target/jacoco.exec</dataFile >
691
+ <!-- Sets the output directory for the code coverage
692
+ report. -->
693
+ <outputDirectory >target/jacoco</outputDirectory >
694
+ </configuration >
695
+ </execution >
686
696
</executions >
697
+ <configuration >
698
+ <excludes >
699
+ <exclude >com/ericsson/ei/controller/model/*</exclude >
700
+ </excludes >
701
+ <systemPropertyVariables >
702
+ <jacoco-agent .destfile>target/jacoco.exec</jacoco-agent .destfile>
703
+ </systemPropertyVariables >
704
+ </configuration >
687
705
</plugin >
688
706
</plugins >
689
707
</build >
You can’t perform that action at this time.
0 commit comments