zio
zio copied to clipboard
[zio-test-sbt] Use IntelliJRenderer when running sbt test inside Teamcity
To propagate test statuses to CI correctly, zio-test-sbt may use IntelliJRenderer when it's running incide teamcity build
see https://github.com/zio/zio/blob/49fddba0e709528083da2f995fdc6537015f3bb9/test-sbt/js-jvm/src/main/scala/zio/test/sbt/ZTestEvent.scala#L26-L28
@swoogles Can you take a look at this?
@ya-goodfella Deciding how to tackle this.
Looks like checking for the TEAMCITY_VERSION
environment variable is the default way to recognize if you're running in that environment?
We're a bit wary of adding custom logic to recognize different CI environments. What do you think about letting users specify which Renderer to use through some configuration channel?
Also, are you maintaining any open source projects that use Teamcity? I haven't worked with it before, and it might be nice if I could push to a branch on a project that was already configured with it.
@swoogles
Looks like checking for the TEAMCITY_VERSION environment variable is the default way to recognize if you're running in that environment?
Yep, looks like it's a preferred way of checking Teamcity environment.
We're a bit wary of adding custom logic to recognize different CI environments. What do you think about letting users specify which Renderer to use through some configuration channel?
I'm ok with that, that's what I was thinking about too - a composable and configurable renderers; although I don't know which way of doing might be user-friendly. AFAIK, sbt doesn't provide a way to configure TestFramework (apart from providing a class names)
Also, are you maintaining any open source projects that use Teamcity? I haven't worked with it before, and it might be nice if I could push to a branch on a project that was already configured with it.
Unfortunately no, but there is free to use Docker image of it Or you can mention me when tests with environment variables would pass, I'm here to help.
@ya-goodfella Try passing -renderer "intellij"
to your SBT test commands now , and make sure that this covers your needs! You'll need to use a snapshot build or wait till 2.0.6
is released.