Skip to content

Commit 1b9c1cc

Browse files
authored
feat(ci): add java info coverage and merge report (#751)
* try to merge report * try to merge report * fix * try to fix * add java info coverage report * fix
1 parent 8e2a5de commit 1b9c1cc

File tree

6 files changed

+61
-1
lines changed

6 files changed

+61
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ jobs:
167167
- name: Upload coverage reports to Codecov
168168
uses: codecov/codecov-action@v4
169169
with:
170+
flag: cpp
170171
token: ${{ secrets.CODECOV_TOKEN }}
171172

172173
- name: Use Static Arrow

.github/workflows/java-info.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,16 @@ jobs:
6868
run: |
6969
export JAVA_HOME=${JAVA_HOME_11_X64}
7070
mvn --no-transfer-progress clean test -Dspotless.check.skip=true
71+
72+
- name: Generate JaCoCo Coverage Report
73+
working-directory: maven-projects/info
74+
run: |
75+
export JAVA_HOME=${JAVA_HOME_11_X64}
76+
mvn jacoco:report --no-transfer-progress
77+
78+
- name: Upload coverage to Codecov
79+
uses: codecov/codecov-action@v4
80+
with:
81+
flag: java-info
82+
files: "./maven-projects/info/target/site/jacoco/jacoco.xml"
83+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/pyspark.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@ jobs:
8181
- name: Upload coverage to Codecov
8282
uses: codecov/codecov-action@v4
8383
with:
84+
flag: pyspark
8485
files: ./coverage.xml
8586
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/spark.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
- name: Upload coverage to Codecov
109109
uses: codecov/codecov-action@v4
110110
with:
111+
flag: spark
111112
files: "./maven-projects/spark/graphar/target/site/jacoco/jacoco.xml"
112113
token: ${{ secrets.CODECOV_TOKEN }}
113114

codecov.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,33 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
flags:
19+
cpp:
20+
paths:
21+
- "cpp/"
22+
spark:
23+
paths:
24+
- "maven-projects/spark/"
25+
pyspark:
26+
paths:
27+
- "pyspark"
28+
java-info:
29+
paths:
30+
- "maven-projects/info/"
31+
coverage:
32+
status:
33+
project:
34+
default:
35+
flags:
36+
- cpp
37+
- spark
38+
- pyspark
39+
- java-info
40+
1841
ignore:
1942
- "cpp/benchmarks/**"
2043
- "cpp/examples/**"
2144
- "cpp/thirdparty/**"
22-
- "cpp/test/**"
45+
- "cpp/test/**"
46+
- "maven-projects/spark/graphar/src/main/scala/org/apache/graphar/importer/**"
47+
- "maven-projects/spark/graphar/src/main/scala/org/apache/graphar/example/**"

maven-projects/info/pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,25 @@
9797
</java>
9898
</configuration>
9999
</plugin>
100+
<plugin>
101+
<groupId>org.jacoco</groupId>
102+
<artifactId>jacoco-maven-plugin</artifactId>
103+
<version>0.8.8</version>
104+
<executions>
105+
<execution>
106+
<goals>
107+
<goal>prepare-agent</goal>
108+
</goals>
109+
</execution>
110+
<execution>
111+
<id>report</id>
112+
<phase>prepare-package</phase>
113+
<goals>
114+
<goal>report</goal>
115+
</goals>
116+
</execution>
117+
</executions>
118+
</plugin>
100119
</plugins>
101120
</build>
102121

0 commit comments

Comments
 (0)