File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 shell : bash
4040 env :
4141 GITHUB_ACTION_PATH : ${{ github.action_path }}
42-
42+ FAIL_ON_ERRORS : ${{inputs.failOnErrors}}
4343
Original file line number Diff line number Diff line change @@ -31833,19 +31833,29 @@ try {
3183331833 if(faults == 0) {
3183431834 core.summary.addHeading('No potential fault was found', '2')
3183531835 } else {
31836- core.error("TODO error message")
31836+
31837+ let message;
3183731838
3183831839 if(faults == 1){
31839- core.summary.addHeading(' 1 potential fault was found', '2')
31840+ message = 'EvoMaster found 1 potential fault in the tested application'
3184031841 } else {
31841- core.summary.addHeading(" " + faults + ' potential faults were found', '2')
31842+ message ="EvoMaster found " + faults + ' potential faults in the tested application'
3184231843 }
3184331844
31845+ core.summary.addHeading(message, '2')
31846+
3184431847 // const failOnErrors = core.getBooleanInput("failOnErrors")
31845- // if(failOnErrors){
31846- // core.setFailed("PROBLEMS FIXME");
31847- // }
31848+ const failOnErrors = process.env.FAIL_ON_ERRORS
31849+ if(failOnErrors.toLowerCase() === "true"){
31850+ core.error(message)
31851+ core.setFailed(message);
31852+ } else if(failOnErrors.toLowerCase() === "false"){
31853+ core.warning(message)
31854+ } else {
31855+ core.setFailed("Invalid 'failOnErrors' value: '" + failOnErrors + "'. Use either 'true' or 'false'");
31856+ }
3184831857 }
31858+ core.summary.write()
3184931859
3185031860} catch (error) {
3185131861 core.setFailed(error.message);
Original file line number Diff line number Diff line change @@ -12,19 +12,29 @@ try {
1212 if ( faults == 0 ) {
1313 core . summary . addHeading ( 'No potential fault was found' , '2' )
1414 } else {
15- core . error ( "TODO error message" )
15+
16+ let message ;
1617
1718 if ( faults == 1 ) {
18- core . summary . addHeading ( ' 1 potential fault was found' , '2' )
19+ message = 'EvoMaster found 1 potential fault in the tested application'
1920 } else {
20- core . summary . addHeading ( " " + faults + ' potential faults were found' , '2' )
21+ message = "EvoMaster found " + faults + ' potential faults in the tested application'
2122 }
2223
24+ core . summary . addHeading ( message , '2' )
25+
2326 // const failOnErrors = core.getBooleanInput("failOnErrors")
24- // if(failOnErrors){
25- // core.setFailed("PROBLEMS FIXME");
26- // }
27+ const failOnErrors = process . env . FAIL_ON_ERRORS
28+ if ( failOnErrors . toLowerCase ( ) === "true" ) {
29+ core . error ( message )
30+ core . setFailed ( message ) ;
31+ } else if ( failOnErrors . toLowerCase ( ) === "false" ) {
32+ core . warning ( message )
33+ } else {
34+ core . setFailed ( "Invalid 'failOnErrors' value: '" + failOnErrors + "'. Use either 'true' or 'false'" ) ;
35+ }
2736 }
37+ core . summary . write ( )
2838
2939} catch ( error ) {
3040 core . setFailed ( error . message ) ;
You can’t perform that action at this time.
0 commit comments