@@ -200,7 +200,7 @@ ${workflowJobs[0].steps![3].name} (0s) :job0-4, after job0-3, 0s
200
200
assertEquals ( createGantt ( workflow , workflowJobs ) , expect ) ;
201
201
} ) ;
202
202
203
- await t . step ( "job has status:in_progress and status:queued steps " , ( ) => {
203
+ await t . step ( "Hide not completed stesp " , ( ) => {
204
204
const workflow = {
205
205
"id" : 6290960492 ,
206
206
"name" : "CI" ,
@@ -260,8 +260,6 @@ axisFormat %H:%M:%S
260
260
section ${ workflowJobs [ 0 ] . name }
261
261
Waiting for a runner (6s) :active, job0-0, 00:04:31, 6s
262
262
${ workflowJobs [ 0 ] . steps ! [ 0 ] . name } (1s) :job0-1, after job0-0, 1s
263
- ${ workflowJobs [ 0 ] . steps ! [ 1 ] . name } (0s) :active, job0-2, after job0-1, 0s
264
- ${ workflowJobs [ 0 ] . steps ! [ 2 ] . name } (0s) :active, job0-3, after job0-2, 0s
265
263
\`\`\`
266
264
` ;
267
265
@@ -533,6 +531,89 @@ ${workflowJobs[1].steps![4].name} (0s) :job1-5, after job1-4, 0s
533
531
${ workflowJobs [ 1 ] . steps ! [ 5 ] . name } (0s) :job1-6, after job1-5, 0s
534
532
${ workflowJobs [ 1 ] . steps ! [ 6 ] . name } (0s) :job1-7, after job1-6, 0s
535
533
\`\`\`
534
+ ` ;
535
+
536
+ assertEquals ( createGantt ( workflow , workflowJobs ) , expect ) ;
537
+ } ) ;
538
+
539
+ await t . step ( "Hide skipped jobs" , ( ) => {
540
+ const workflow = {
541
+ "id" : 5833450919 ,
542
+ "name" : "Check self-hosted runner" ,
543
+ "run_number" : 128 ,
544
+ "event" : "workflow_dispatch" ,
545
+ "status" : "completed" ,
546
+ "conclusion" : "success" ,
547
+ "workflow_id" : 10970418 ,
548
+ "created_at" : "2023-08-11T14:00:48Z" ,
549
+ "updated_at" : "2023-08-11T14:01:56Z" ,
550
+ } as unknown as Workflow ;
551
+
552
+ const workflowJobs = [
553
+ {
554
+ "id" : 15820938470 ,
555
+ "run_id" : 5833450919 ,
556
+ "workflow_name" : "Check self-hosted runner" ,
557
+ "status" : "completed" ,
558
+ "conclusion" : "success" ,
559
+ "created_at" : "2023-08-11T14:00:50Z" ,
560
+ "started_at" : "2023-08-11T14:01:31Z" ,
561
+ "completed_at" : "2023-08-11T14:01:36Z" ,
562
+ "name" : "node" ,
563
+ "steps" : [
564
+ {
565
+ "name" : "Set up job" ,
566
+ "status" : "completed" ,
567
+ "conclusion" : "success" ,
568
+ "number" : 1 ,
569
+ "started_at" : "2023-08-11T23:01:30.000+09:00" ,
570
+ "completed_at" : "2023-08-11T23:01:32.000+09:00" ,
571
+ } ,
572
+ {
573
+ "name" : "Set up runner" ,
574
+ "status" : "completed" ,
575
+ "conclusion" : "success" ,
576
+ "number" : 2 ,
577
+ "started_at" : "2023-08-11T23:01:32.000+09:00" ,
578
+ "completed_at" : "2023-08-11T23:01:32.000+09:00" ,
579
+ } ,
580
+ {
581
+ "name" : "Run actions/checkout@v3" ,
582
+ "status" : "completed" ,
583
+ "conclusion" : "success" ,
584
+ "number" : 3 ,
585
+ "started_at" : "2023-08-11T23:01:34.000+09:00" ,
586
+ "completed_at" : "2023-08-11T23:01:34.000+09:00" ,
587
+ } ,
588
+ ] ,
589
+ } ,
590
+ {
591
+ "id" : 15820938790 ,
592
+ "run_id" : 5833450919 ,
593
+ "workflow_name" : "Check self-hosted runner" ,
594
+ "status" : "completed" ,
595
+ "conclusion" : "skipped" ,
596
+ "created_at" : "2023-08-11T14:00:51Z" ,
597
+ "started_at" : "2023-08-11T14:00:51Z" ,
598
+ "completed_at" : "2023-08-11T14:01:50Z" ,
599
+ "name" : "skipped test" ,
600
+ "steps" : [ ] ,
601
+ } ,
602
+ ] as unknown as WorkflowJobs ;
603
+
604
+ // deno-fmt-ignore
605
+ const expect = `
606
+ \`\`\`mermaid
607
+ gantt
608
+ title ${ workflowJobs [ 0 ] . workflow_name }
609
+ dateFormat HH:mm:ss
610
+ axisFormat %H:%M:%S
611
+ section ${ workflowJobs [ 0 ] . name }
612
+ Waiting for a runner (41s) :active, job0-0, 00:00:02, 41s
613
+ ${ workflowJobs [ 0 ] . steps ! [ 0 ] . name } (2s) :job0-1, after job0-0, 2s
614
+ ${ workflowJobs [ 0 ] . steps ! [ 1 ] . name } (0s) :job0-2, after job0-1, 0s
615
+ ${ workflowJobs [ 0 ] . steps ! [ 2 ] . name } (0s) :job0-3, after job0-2, 0s
616
+ \`\`\`
536
617
` ;
537
618
538
619
assertEquals ( createGantt ( workflow , workflowJobs ) , expect ) ;
0 commit comments