File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,20 @@ jobs:
1616
1717 steps :
1818 - uses : actions/checkout@v2
19+
1920 - name : Set up JDK 1.8
2021 uses : actions/setup-java@v1
2122 with :
2223 java-version : 1.8
24+
2325 - name : Grant execute permission for gradlew
2426 run : chmod +x gradlew
27+
2528 - name : Build with Gradle
2629 run : ./gradlew build
30+
31+ - name : Generate coverage
32+ run : ./gradlew codeCoverageReport
33+
34+ - name : Codecov
35+
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ group 'io.visual-regression-tracker.sdk-java'
22version ' 3.1.0'
33
44apply plugin : ' java'
5+ apply plugin : ' jacoco'
56apply plugin : " io.freefair.lombok"
67apply plugin : " com.github.johnrengelman.shadow"
78
@@ -34,4 +35,25 @@ dependencies {
3435
3536test {
3637 useTestNG()
38+ finalizedBy jacocoTestReport // report is always generated after tests run
39+ }
40+
41+ // codecov integration https://github.com/codecov/example-gradle
42+ task codeCoverageReport (type : JacocoReport ) {
43+ executionData fileTree(project. rootDir. absolutePath). include(" **/build/jacoco/*.exec" )
44+
45+ subprojects. each {
46+ sourceSets it. sourceSets. main
47+ }
48+
49+ reports {
50+ xml. enabled true
51+ xml. destination file(" ${ buildDir} /reports/jacoco/report.xml" )
52+ html. enabled false
53+ csv. enabled false
54+ }
55+ }
56+
57+ codeCoverageReport. dependsOn {
58+ subprojects* . test
3759}
Original file line number Diff line number Diff line change 11# This file is generated by the 'io.freefair.lombok' Gradle plugin
22config.stopBubbling = true
3+ lombok.addLombokGeneratedAnnotation = true
You can’t perform that action at this time.
0 commit comments