Skip to content

Commit 61b57cf

Browse files
Merge pull request #12 from digital-delivery-academy/codacy-fixes
Adding coverage plugin for codacy
2 parents f17a3c7 + c24b3d1 commit 61b57cf

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ deploy:
1818
script: mvn deploy -DskipTests -Dregistry=https://maven.pkg.github.com/digital-delivery-academy -Dtoken=$GITHUB_PACKAGE_DEPLOY_TOKEN
1919
on:
2020
tags: true
21+
- provider: script
22+
script: mvn package com.gavinmogan:codacy-maven-plugin:coverage -DcoverageReportFile=target/site/jacoco/jacoco.xml -DprojectToken=$CODACY_PROJECT_TOKEN -DapiToken=$CODACY_API_TOKEN
23+
on:
24+
all_branches: true
2125

2226
notifications:
2327
slack: evoco:HMLAFFFsZHDFu6xBw0OyXZrp

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<jackson.version>2.10.1</jackson.version>
6060
<mockneat.version>0.3.8</mockneat.version>
6161
<versions.maven.plugin.version>2.7</versions.maven.plugin.version>
62+
<jacoco.maven.plugin.version>0.8.5</jacoco.maven.plugin.version>
6263
<joda.time.version>2.7</joda.time.version>
6364
</properties>
6465

@@ -144,6 +145,25 @@
144145
<generateBackupPoms>false</generateBackupPoms>
145146
</configuration>
146147
</plugin>
148+
<plugin>
149+
<groupId>org.jacoco</groupId>
150+
<artifactId>jacoco-maven-plugin</artifactId>
151+
<version>${jacoco.maven.plugin.version}</version>
152+
<executions>
153+
<execution>
154+
<goals>
155+
<goal>prepare-agent</goal>
156+
</goals>
157+
</execution>
158+
<execution>
159+
<id>report</id>
160+
<phase>test</phase>
161+
<goals>
162+
<goal>report</goal>
163+
</goals>
164+
</execution>
165+
</executions>
166+
</plugin>
147167
</plugins>
148168
</build>
149169
</project>

0 commit comments

Comments
 (0)