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

Support test skipping on CircleCI builds? #825

Closed
mbjoseph opened this issue Dec 4, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@mbjoseph
Copy link
Contributor

commented Dec 4, 2018

For automated builds running on CircleCI, it might be convenient to have a skip_on_circle() function to skip tests, similar to skip_on_travis(). By default, CircleCI builds export an environment variable CIRCLECI that takes on the value "true": https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables

Is this something that folks would be interested in including in testthat?

@jimhester

This comment has been minimized.

Copy link
Member

commented Dec 4, 2018

Most CI systems set the CI environment variable, e.g. both travis and CircleCI do.

I think if we were going to add another skip to testthat itself it would be a generalskip_on_ci() rather than another CI specific skip function.

@mbjoseph

This comment has been minimized.

Copy link
Contributor Author

commented Dec 4, 2018

Thanks @jimhester! That does seem like a better solution.

I have a PR open (#826) and would be happy to modify it to implement skip_on_ci() if you'd like.

@jimhester

This comment has been minimized.

Copy link
Member

commented Dec 4, 2018

Modifying the existing PR sounds good to me, thanks!

@mbjoseph

This comment has been minimized.

Copy link
Contributor Author

commented Dec 4, 2018

Great - I have updated the PR to implement skip_on_ci(), which checks to see whether the CI environment variable is either "true" (as with Travis and CircleCI) or "True" (as with AppVeyor Windows builds): https://github.com/r-lib/testthat/pull/826/files#diff-8118c4bf22b8b996a3b1d49ba32e01feR173

@hadley hadley added this to the testthat 2.1.0 milestone Apr 1, 2019

@hadley hadley closed this in 9e72f98 Apr 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.