skip method

void skip(
  1. String stage,
  2. String subject,
  3. String logName,
  4. String reason,
)

A step deliberately not run; the reason is its log. Counted apart from green and red.

Implementation

void skip(String stage, String subject, String logName, String reason) {
  final logPath = p.join(runDir, logName);
  File(logPath)
    ..parent.createSync(recursive: true)
    ..writeAsStringSync('skipped: $reason\n');
  outcomes.add(
    CiOutcome(
      stage: stage,
      subject: subject,
      ok: true,
      logPath: logPath,
      detail: 'skipped — $reason',
      skipped: true,
    ),
  );
  final label = subject == stage ? '[$stage]' : '[$stage] $subject';
  console.writeln('$label skipped — $reason');
}