File tree Expand file tree Collapse file tree 4 files changed +19
-25
lines changed Expand file tree Collapse file tree 4 files changed +19
-25
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,9 @@ install:
36
36
script :
37
37
# Only run code generation tests on OSX -- linux requires sudo to install OpenCV dependencies, and that environment
38
38
# will not be able to run MainWindowTest.testDragOperationFromPaletteToPipeline
39
- - ./gradlew check jacocoTestReport jacocoRootReport --stacktrace -Pheadless=true -PlogTests;
39
+ - ./gradlew check --stacktrace -Pheadless=true -PlogTests;
40
40
41
41
after_success :
42
- - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then codecov ; fi
43
42
- .travis-scripts/push-javadoc-to-gh-pages.sh
44
43
- .travis-scripts/before-deploy.sh
45
44
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ build_script:
6
6
7
7
# to run your custom scripts instead of automatic tests
8
8
test_script :
9
- - gradlew.bat check jacocoTestReport jacocoRootReport --stacktrace -Pheadless=true -PlogTests -Dscan
9
+ - gradlew.bat check --stacktrace -Pheadless=true -PlogTests -Dscan
10
10
11
11
platform :
12
12
- x64
Original file line number Diff line number Diff line change @@ -31,14 +31,11 @@ jobs:
31
31
publishJUnitResults : false
32
32
tasks : ' check jacocoTestReport jacocoRootReport jfxNative -Pgeneration -PjniLocation=build/OpenCVJNI -Pheadless=true -PlogTests --stacktrace'
33
33
34
- # Publish JaCoCo code coverage results from the build
35
- - task : PublishCodeCoverageResults@1
36
- inputs :
37
- codeCoverageTool : ' JaCoCo'
38
- summaryFileLocation : ' $(System.DefaultWorkingDirectory)/**/reports/jacoco/test/jacocoTestReport.xml'
39
- reportDirectory : ' $(System.DefaultWorkingDirectory)/**/reports/jacoco/test/jacocoTestReport.html'
40
- additionalCodeCoverageFiles : ' $(System.DefaultWorkingDirectory)/**/build/jacoco/text.exec'
41
- failIfCoverageEmpty : false
34
+ - script : |
35
+ curl -s https://codecov.io/bash > .codecov
36
+ chmod +x .codecov
37
+ ./.codecov -t $(CODECOV_TOKEN)
38
+ displayName: 'Upload jacoco reports to codecov'
42
39
43
40
- task : CopyFiles@2
44
41
inputs :
Original file line number Diff line number Diff line change @@ -159,22 +159,20 @@ tasks.register<JacocoReport>("jacocoRootReport") {
159
159
group = " Coverage reports"
160
160
description = " Generates an aggregate report from all subprojects"
161
161
162
- reports {
163
- html.isEnabled = true
164
- xml.isEnabled = true
165
- }
162
+ // Based on the codecov Gradle example: https://github.com/codecov/example-gradle
166
163
167
164
javaSubprojects {
168
- val sourceSets = (this as ExtensionAware ).extensions.getByName(" sourceSets" ) as SourceSetContainer
169
- dependsOn(tasks[" test" ])
170
- val srcFiles = files(sourceSets[" main" ].allSource.srcDirs)
171
- additionalSourceDirs(srcFiles)
172
- sourceDirectories.from(srcFiles)
173
- classDirectories.from(files(sourceSets[" main" ].output))
174
- executionData.from(tasks.named<JacocoReport >(" jacocoTestReport" ).map { it.executionData })
175
- }
176
- doFirst {
177
- executionData.setFrom(files(executionData.files.filter { it.exists() }))
165
+ this @register.sourceSets(sourceSets[" main" ])
166
+ this @register.dependsOn(tasks.named<JacocoReport >(" jacocoTestReport" ))
167
+ }
168
+
169
+ executionData(fileTree(rootDir.absolutePath).include(" **/build/jacoco/*.exec" ))
170
+
171
+ reports {
172
+ xml.isEnabled = true
173
+ xml.destination = buildDir.resolve(" reports/jacoco/report.xml" )
174
+ html.isEnabled = false
175
+ csv.isEnabled = false
178
176
}
179
177
}
180
178
You can’t perform that action at this time.
0 commit comments