Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zio-test-sbt] Use IntelliJRenderer when running sbt test inside Teamcity #7241

Closed
ak0rz opened this issue Aug 24, 2022 · 4 comments · Fixed by #7647
Closed

[zio-test-sbt] Use IntelliJRenderer when running sbt test inside Teamcity #7241

ak0rz opened this issue Aug 24, 2022 · 4 comments · Fixed by #7647
Assignees
Labels

Comments

@ak0rz
Copy link
Contributor

ak0rz commented Aug 24, 2022

To propagate test statuses to CI correctly, zio-test-sbt may use IntelliJRenderer when it's running incide teamcity build

see

ConsoleRenderer
.renderToStringLines(Message(ConsoleRenderer.render(test, true).map(Line.fromString(_))))
.mkString("\n")

@adamgfraser
Copy link
Contributor

@swoogles Can you take a look at this?

@swoogles
Copy link
Contributor

@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.

@ak0rz
Copy link
Contributor Author

ak0rz commented Aug 31, 2022

@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.

@swoogles
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants