File tree 3 files changed +11
-2
lines changed
src/functionalTest/java/org/scoverage
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 25
25
run : chmod +x gradlew
26
26
- name : Build with Gradle
27
27
run : ./gradlew --info --stacktrace check
28
+ - name : Fail on warning
29
+ run : ./gradlew --info --stacktrace check --warning-mode=fail -PfailOnWarning
30
+ continue-on-error : true
Original file line number Diff line number Diff line change @@ -104,6 +104,8 @@ task functionalTest(type: Test) {
104
104
showStandardStreams = System . env. CI == ' true'
105
105
}
106
106
107
+ systemProperty ' failOnWarning' , project. hasProperty(' failOnWarning' )
108
+
107
109
mustRunAfter crossScalaVersionTest
108
110
}
109
111
check. dependsOn functionalTest
@@ -206,4 +208,4 @@ idea.project.settings {
206
208
taskTriggers {
207
209
beforeBuild fixIdeaPluginClasspath, pluginUnderTestMetadata
208
210
}
209
- }
211
+ }
Original file line number Diff line number Diff line change @@ -127,7 +127,11 @@ private void configureArguments(String... arguments) {
127
127
fullArguments .add ("-PjunitVersion=5.3.2" );
128
128
fullArguments .add ("-PjunitPlatformVersion=1.3.2" );
129
129
fullArguments .add ("-PscalatestVersion=3.0.8" );
130
- fullArguments .add ("--warning-mode=all" );
130
+ if (Boolean .parseBoolean (System .getProperty ("failOnWarning" ))) {
131
+ fullArguments .add ("--warning-mode=fail" );
132
+ } else {
133
+ fullArguments .add ("--warning-mode=all" );
134
+ }
131
135
fullArguments .addAll (Arrays .asList (arguments ));
132
136
133
137
runner .withArguments (fullArguments );
You can’t perform that action at this time.
0 commit comments