thekompanee / fuubar

The instafailing RSpec progress bar formatter
http://jeffkreeftmeijer.com/2010/fuubar-the-instafailing-rspec-progress-bar-formatter/
MIT License
955 stars 65 forks source link

Gitlab CI strange output #98

Closed ivanovaleksey closed 7 years ago

ivanovaleksey commented 7 years ago

Hi, thanks for the nice gem!

I don't think it is a issue with the gem really but I don't where to start my investigations. I use the gem on Gitlab CI.

So I run RSpec with a command bundle exec rspec --format Fuubar. But it gives me very poor progress bar formatting.

As I can see I should somehow force tty option. I found this PR, added --tty option to my initial command.

And now the output looks like the following: image

I don't quite understand what causes the issue. Is it something with Gitlab CI settings? Is there anything I can do to avoid this behaviour? I would like progress bar to be rewritten on the same line (as it works locally).

Thanks.

jfelchner commented 7 years ago

@ivanovaleksey you actually want the opposite. Remove the --tty option and instead set the CONTINUOUS_INTEGRATION environment variable to true in your build. That should solve your problem.

ivanovaleksey commented 7 years ago

Thank you for the reply @jfelchner. With CONTINUOUS_INTEGRATION=true bundle exec rspec --format Fuubar command progress bar looks like this (as it described in progress bar wiki page):

Progress: |===================

It is the same behavior I get when running rspec without any additional options, just bundle exec rspec --format Fuubar

Is there any way to get progress bar with ' %c/%C |%w>%i| %e ' format but on the same line?

jfelchner commented 7 years ago

@ivanovaleksey not unless Gitlab starts supporting ANSI codes and carriage returns in their log output.

ivanovaleksey commented 7 years ago

Thank you @jfelchner for the explanation.

github-actions[bot] commented 3 years ago

This issue has been closed automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.