Skip to content

Commit 8964ff2

Browse files
committed
added JaCoCo and integration with Codecov
Signed-off-by: Konstantin Läufer <laufer@cs.luc.edu>
1 parent e380b87 commit 8964ff2

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/main_primechecker.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
pushd './${{ env.PACKAGE_DIRECTORY }}'
3333
mvn clean package
3434
popd
35+
3536
- name: 'Run Azure Functions Action'
3637
uses: Azure/functions-action@v1
3738
id: fa
@@ -41,3 +42,8 @@ jobs:
4142
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_FB1881EE8A4C49E1B5CDBAB1767BA169 }}
4243
package: '${{ env.PACKAGE_DIRECTORY }}'
4344
respect-pom-xml: true
45+
46+
- name: Upload coverage reports to Codecov
47+
uses: codecov/codecov-action@v3
48+
env:
49+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,26 @@
104104
</filesets>
105105
</configuration>
106106
</plugin>
107+
<plugin>
108+
<groupId>org.jacoco</groupId>
109+
<artifactId>jacoco-maven-plugin</artifactId>
110+
<version>0.8.11</version>
111+
<executions>
112+
<execution>
113+
<id>prepare-agent</id>
114+
<goals>
115+
<goal>prepare-agent</goal>
116+
</goals>
117+
</execution>
118+
<execution>
119+
<id>report</id>
120+
<phase>test</phase>
121+
<goals>
122+
<goal>report</goal>
123+
</goals>
124+
</execution>
125+
</executions>
126+
</plugin>
107127
</plugins>
108128
</build>
109129
</project>

0 commit comments

Comments
 (0)