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

adds skip_on_gh_actions (resolves #970) #975

Closed
wants to merge 3 commits into from

Conversation

njtierney
Copy link

Completely stolen the code from #970, but renamed function to skip_on_gh_actions() instead of skip_on_actions() - please feel free to change!

Thanks!

@jimhester
Copy link
Member

LGTM

Co-authored-by: @boshek (Sam Albers) <sam.albers@gov.bc.ca>
@@ -9,6 +9,7 @@
* Fixed issue where error and warning messages were not retrieved with
`conditionMessage()` under certain circumstances.

* Add `skip_on_gh_actions()` helper, to skip tests on GitHub Actions (#970) (@boshek, @njtieney).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please merge/rebase and move the NEWS bullet up?

@coatless
Copy link

coatless commented Mar 16, 2020

@njtierney outside of rebasing, could you add the skip_on_gh_actions() function to the details section of the documentation so that it is alongside the other skip variants? (I stumbled across this looking for the relevant skip_on_*().

https://github.com/r-lib/testthat/pull/975/files#diff-8118c4bf22b8b996a3b1d49ba32e01feR23-R30

#' `skip_on_ghactions()` skips tests on GitHub Actions by inspecting the
#' `GITHUB_ACTIONS` environment variable.
#'

@hadley
Copy link
Member

hadley commented Apr 13, 2020

Closing since you can just use skip_on_ci(), which is more general.

@hadley hadley closed this Apr 13, 2020
@kevinushey
Copy link
Collaborator

Does skip_on_ci() need to check GITHUB_ACTIONS as well? It seems like CI is not defined on GitHub Actions; at least as documented at https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables.

@hadley
Copy link
Member

hadley commented Apr 13, 2020

We set it in our CI actions, which I think will cover 99% of R users.

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

Successfully merging this pull request may close these issues.

5 participants