@@ -31,8 +31,8 @@ function PostSmokeTest(ShowReport)
31
31
32
32
% Format the results in a table and save them
33
33
Results = table(Results ' );
34
- Results = Results(Results .Passed ,: );
35
34
Version = extractBetween(string(Results .Name )," Version=" ," )" );
35
+ Passed = Results .Passed ;
36
36
37
37
% Add link to other report
38
38
File = fileread(fullfile(" public" ," index.html" ));
@@ -45,13 +45,16 @@ function PostSmokeTest(ShowReport)
45
45
% Format the JSON file
46
46
Badge = struct ;
47
47
Badge.schemaVersion = 1 ;
48
- Badge.label = " Tested with" ;
49
- if size(Results ,1 ) >= 1
50
- Badge.color = " success"
48
+ Badge.label = " Test Status" ;
49
+ if all(Passed )
50
+ Badge.color = " success" ;
51
+ Badge.message = join(" R" +Version ," | " );
52
+ elseif any(Passed )
53
+ Badge.color = " yellowgreen" ;
54
+ Badge.message = join(" R" )
55
+ elseif all(~Passed )
56
+ Badge.color = " critical" ;
51
57
Badge.message = join(" R" +Version ," | " );
52
- else
53
- Badge.color = " failure" ;
54
- Badge.message = " Pipeline fails" ;
55
58
end
56
59
Badge = jsonencode(Badge );
57
60
writelines(Badge ,fullfile(" Images" ," TestedWith.json" ));
0 commit comments