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
Closed

Support test skipping on CircleCI builds? #825

mbjoseph opened this issue Dec 4, 2018 · 4 comments
Labels
feature a feature request or enhancement skip wip work in progress

Comments

@mbjoseph
Copy link
Contributor

mbjoseph 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
Copy link
Member

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
Copy link
Contributor Author

mbjoseph 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
Copy link
Member

Modifying the existing PR sounds good to me, thanks!

@mbjoseph
Copy link
Contributor Author

mbjoseph 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 feature a feature request or enhancement wip work in progress skip labels Mar 28, 2019
@hadley hadley added this to the testthat 2.1.0 milestone Apr 1, 2019
@hadley hadley closed this as completed in 9e72f98 Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement skip wip work in progress
Projects
None yet
Development

No branches or pull requests

3 participants