Skip to content

Commit

Permalink
disable progress bar in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
muodov committed Dec 6, 2024
1 parent 72f4b07 commit 404f306
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions reporters/CLIReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class CLIReporter extends BaseReporter {
this.alwaysLog(chalk.cyan(`Start time: ${options.startTime.toUTCString()}`));
this.alwaysLog(chalk.cyan(`URLs to crawl: ${options.urls}`));

// show progress bar only if we are not printing all logs to screen (verbose)
this.progressBar = (options.urls === 0) ? null : new ProgressBar('[:bar] :percent :finished ETA :etas fail :fail% :site', {
// eslint-disable-next-line no-process-env
this.progressBar = (options.urls === 0 || process.env.IS_CI) ? null : new ProgressBar('[:bar] :percent :finished ETA :etas fail :fail% :site', {
complete: chalk.green('='),
incomplete: ' ',
total: options.urls,
Expand Down Expand Up @@ -60,8 +60,7 @@ class CLIReporter extends BaseReporter {
fail: (data.failures / finished * 100).toFixed(1)
});
} else {

this.log(`Site ${finished} / ${data.urls} (${(finished / data.urls * 100).toFixed(1)}%)`);
this.alwaysLog(`Finished: ${finished} Failed: ${data.failures} Total: ${data.urls}`);
}
}

Expand Down

0 comments on commit 404f306

Please sign in to comment.