Skip to content

Commit 0c045b5

Browse files
authored
Merge branch 'eiffel-community:master' into eicommon
2 parents 45a3128 + 503ebda commit 0c045b5

File tree

2 files changed

+31
-40
lines changed

2 files changed

+31
-40
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -88,40 +88,13 @@ jobs:
8888
- name: Run integration tests
8989
run: |
9090
mvn --version
91-
mvn verify -DskipUTs -Djasypt.encryptor.password=integrationtest -Dspring.config.location=src/integrationtests/resources/application.properties -B
92-
93-
reportCoverage:
94-
if: github.repository == 'eiffel-community/eiffel-intelligence' && github.event_name == 'push'
95-
# The type of runner that the job will run on
96-
runs-on: ubuntu-latest
97-
env:
98-
M2_HOME: /opt/apache-maven-3.6.3
99-
MAVEN_HOME: /opt/apache-maven-3.6.3
91+
mvn verify -DskipUTs -Djasypt.encryptor.password=integrationtest -Dspring.config.location=src/integrationtests/resources/application.properties jacoco:report -Dformats=xml -B
10092
101-
# Steps represent a sequence of tasks that will be executed as part of the job
102-
steps:
103-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
104-
- uses: actions/checkout@v4
105-
- uses: actions/setup-java@v4
106-
with:
107-
distribution: 'temurin'
108-
java-version: '17'
109-
110-
- name: Install Maven
111-
shell: bash
112-
run: |
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-
tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt
115-
echo "${M2_HOME}/bin" >> $GITHUB_PATH
116-
117-
- name: Run cobertura
118-
shell: bash
119-
run: |
120-
mvn cobertura:cobertura -Dcobertura.report.format=xml -B
121-
12293
# Generating test coverage report and publishing to Codacy
12394
- name: Run report coverage
95+
if: github.event_name == 'push'
12496
uses: codacy/codacy-coverage-reporter-action@v1
12597
with:
126-
project-token: 571cdd20d4bf435f84b25d806d304792
127-
coverage-reports: target/site/cobertura/coverage.xml
98+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
99+
coverage-reports: target/site/jacoco/jacoco.xml
100+

pom.xml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -664,26 +664,44 @@
664664
<groupId>org.jacoco</groupId>
665665
<artifactId>jacoco-maven-plugin</artifactId>
666666
<version>0.8.8</version>
667-
<configuration>
668-
<excludes>
669-
<exclude>com/ericsson/ei/controller/model/*</exclude>
670-
</excludes>
671-
</configuration>
672667
<executions>
673668
<execution>
674-
<id>jacoco-initialize</id>
669+
<id>prepare-agent</id>
675670
<goals>
676671
<goal>prepare-agent</goal>
677672
</goals>
678673
</execution>
679674
<execution>
680-
<id>jacoco-site</id>
681-
<phase>package</phase>
675+
<id>report</id>
676+
<phase>prepare-package</phase>
682677
<goals>
683678
<goal>report</goal>
684679
</goals>
685680
</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>
686696
</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>
687705
</plugin>
688706
</plugins>
689707
</build>

0 commit comments

Comments
 (0)