CleanCut / green

Green is a clean, colorful, fast python test runner.
MIT License
791 stars 75 forks source link

Support GitLab-CI #117

Closed dougthor42 closed 8 years ago

dougthor42 commented 8 years ago

Looks like the GitLab-CI is having the same issues that Appveyor had with colors.

If green is run within the gitlab-runner instance, then it should turn off Colorama so that colors are enabled.

I have no idea how you'd check for that, though... When the runner is installed on a Windows machine, it runs in a Windows terminal...

I guess the best way to support it would be to have a CLI option of "do not allow Colorama to convert color codes" or something like that.

dougthor42 commented 8 years ago

Just FYI: I'm working on a PR to add a "--nowindows" CLI option that will prevent Colorama from doing it's thing. This will allow people to get green working on GitLab just by passing an extra arg.

CleanCut commented 8 years ago

Sounds great! Put it in the "Format Options" group next to --notermcolor

On Fri, Feb 26, 2016 at 11:52 AM Douglas Thor notifications@github.com wrote:

Just FYI: I'm working on a PR to add a "--nowindows" CLI option that will prevent Colorama from doing it's thing. This will allow people to get green working on GitLab just by passing an extra arg.

— Reply to this email directly or view it on GitHub https://github.com/CleanCut/green/issues/117#issuecomment-189421674.

dougthor42 commented 8 years ago

All done. Was a little touch-and-go with the unit tests for a second, but I think everything's good to go now.

dougthor42 commented 8 years ago

For others who may find this:

After #118 has been merged and @CleanCut releases the next version of green, you'll need to use the -t and -W flags to get colors working if your gitlab-runner is on Windows:

# .gitlab-ci.yml
job-name-here:
  script:
    - green -t -W test_file.py

Additional information at gitlab-ci-multi-runner Issue #332 and MR #102.

dougthor42 commented 8 years ago

By the way, this was fixed with PR #118. Sorry for forgetting to mark it!

CleanCut commented 8 years ago

No worries, thanks!