Skip to content

Commit 0e950f5

Browse files
committed
docs:support Codecov.
Signed-off-by: Haotian Zhang <[email protected]>
1 parent 44bfe1f commit 0e950f5

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.github/workflows/testing.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,8 @@ jobs:
6262
restore-keys: |
6363
${{ runner.os }}-maven-
6464
- name: Test with Maven
65-
run: mvn -B test --file pom.xml
65+
run: mvn clean test -B -U --file pom.xml
66+
- name: Upload coverage reports to Codecov
67+
uses: codecov/codecov-action@v4
68+
env:
69+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# dubbo-java-polaris
22

3+
[![codecov](https://codecov.io/gh/polarismesh/dubbo-java-polaris/branch/dubbo-2.7.x/graph/badge.svg?token=I9fctxnRWi)](https://app.codecov.io/gh/polarismesh/dubbo-java-polaris/tree/dubbo-3.2.x)
4+
[![Testing](https://github.com/polarismesh/dubbo-java-polaris/actions/workflows/testing.yml/badge.svg?branch=dubbo-2.7.x)](https://github.com/polarismesh/dubbo-java-polaris/actions/workflows/testing.yml)
5+
36
## 介绍
47

58
dubbo-java-polaris 是 [Apache Dubbo](https://github.com/apache/dubbo) 框架的扩展,便于使用dubbo框架开发的应用可以接入并使用北极星的各部分功能。

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
<maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>
7373
<maven.flatten.plugin.version>1.2.5</maven.flatten.plugin.version>
7474
<maven.clean.plugin.version>3.1.0</maven.clean.plugin.version>
75+
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
7576
<central.publishing.maven.plugin.version>0.8.0</central.publishing.maven.plugin.version>
7677

7778
<timestamp>${maven.build.timestamp}</timestamp>
@@ -166,6 +167,26 @@
166167
<suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>
167168
</configuration>
168169
</plugin>
170+
<plugin>
171+
<groupId>org.jacoco</groupId>
172+
<artifactId>jacoco-maven-plugin</artifactId>
173+
<version>${jacoco-maven-plugin.version}</version>
174+
<executions>
175+
<execution>
176+
<id>prepare-agent</id>
177+
<goals>
178+
<goal>prepare-agent</goal>
179+
</goals>
180+
</execution>
181+
<execution>
182+
<id>report</id>
183+
<phase>test</phase>
184+
<goals>
185+
<goal>report</goal>
186+
</goals>
187+
</execution>
188+
</executions>
189+
</plugin>
169190
<plugin>
170191
<groupId>org.apache.maven.plugins</groupId>
171192
<artifactId>maven-surefire-plugin</artifactId>

0 commit comments

Comments
 (0)