This is an automated email from the ASF dual-hosted git repository.
zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 9bb5ad527b Add Traffic Router unit tests to Codecov (#7230)
9bb5ad527b is described below
commit 9bb5ad527b9c3e3dfcce86cd9bab478431d3e1d2
Author: Eric Holguin <[email protected]>
AuthorDate: Fri Dec 2 17:01:04 2022 -0700
Add Traffic Router unit tests to Codecov (#7230)
* Add jacoco plugin to get ccode coverage report
* Add codecov to tr test gha
* undo unneeded dependency
---
.github/workflows/tr.tests.yaml | 5 +++++
traffic_router/core/pom.xml | 13 +++++++++++++
traffic_router/pom.xml | 13 +++++++++++++
3 files changed, 31 insertions(+)
diff --git a/.github/workflows/tr.tests.yaml b/.github/workflows/tr.tests.yaml
index 764f1b01c9..050e740188 100644
--- a/.github/workflows/tr.tests.yaml
+++ b/.github/workflows/tr.tests.yaml
@@ -58,6 +58,11 @@ jobs:
- name: Run Traffic Router tests
run: mvn -Djava.library.path=/usr/lib/x86_64-linux-gnu verify
working-directory: ${{ github.workspace }}/traffic_router
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v3
+ with:
+ files: core/target/site/jacoco-aggregate/jacoco.xml
+ flags: traffic_router_unit
- name: Upload Surefire and Failsafe Reports
uses: actions/upload-artifact@v3
if: ${{ failure() }}
diff --git a/traffic_router/core/pom.xml b/traffic_router/core/pom.xml
index a2a64f9466..3628b485a8 100644
--- a/traffic_router/core/pom.xml
+++ b/traffic_router/core/pom.xml
@@ -226,6 +226,19 @@
<attachClasses>true</attachClasses>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>report-aggregate</id>
+ <phase>verify</phase>
+ <goals>
+
<goal>report-aggregate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/traffic_router/pom.xml b/traffic_router/pom.xml
index 0ada94ebda..76de817a7c 100644
--- a/traffic_router/pom.xml
+++ b/traffic_router/pom.xml
@@ -71,6 +71,19 @@
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.8</version>
+ <executions>
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+
<goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>