Skip to content

Commit 9cc2e7c

Browse files
authored
Fix Coveralls integration for Gradle 9 by migrating to GitHub Action uploader (#382)
* Remove coveralls plugin and use github action instead Signed-off-by: Max Lambrecht <[email protected]> * Remove manual trigger Signed-off-by: Max Lambrecht <[email protected]> * Revert change Signed-off-by: Max Lambrecht <[email protected]> --------- Signed-off-by: Max Lambrecht <[email protected]>
1 parent ca64be7 commit 9cc2e7c

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

.github/workflows/coverage.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@ on:
66

77
jobs:
88
create-coverage:
9-
109
runs-on: ubuntu-latest
11-
1210
steps:
1311
- uses: actions/checkout@v6
1412
- name: Set up JDK
1513
uses: actions/setup-java@v5
1614
with:
1715
java-version: '17'
1816
distribution: 'adopt'
19-
- name: Generate and upload coverage report
20-
env:
21-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
22-
run: ./gradlew jacocoTestReport coveralls
17+
18+
- name: Generate JaCoCo report
19+
run: ./gradlew test jacocoTestReport
20+
21+
- name: Upload coverage to Coveralls
22+
uses: coverallsapp/github-action@v2
23+
with:
24+
github-token: ${{ secrets.GITHUB_TOKEN }}
25+
file: build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml
26+
format: jacoco
27+
2328
- name: Cleanup Gradle Cache
2429
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
2530
# Restoring these files from a GitHub Actions cache might cause problems for future builds.

build.gradle

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
plugins {
2-
id 'com.github.kt3k.coveralls' version '2.12.2'
32
id 'com.google.osdetector' version '1.7.3'
43
id 'jvm-test-suite'
54
id 'com.vanniktech.maven.publish' version '0.35.0'
@@ -153,13 +152,6 @@ jacocoTestReport.dependsOn {
153152
}
154153
}
155154

156-
coveralls {
157-
jacocoReportPath 'build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml'
158-
sourceDirs = ['java-spiffe-core/src/main/java',
159-
'java-spiffe-helper/src/main/java',
160-
'java-spiffe-provider/src/main/java']
161-
}
162-
163155
// copy submodules jars to a common folder for deploy
164156
task copyJars(type: Copy) {
165157
duplicatesStrategy = DuplicatesStrategy.INCLUDE

0 commit comments

Comments
 (0)