Skip to content

Commit

Permalink
merge pr #1097: add CI to mimic noSuggests cran env
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch authored Apr 11, 2022
2 parents db9ec31 + 93f2e7c commit eef704e
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/R-CMD-check-hard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow only directly installs "hard" dependencies, i.e. Depends,
# Imports, and LinkingTo dependencies. Notably, Suggests dependencies are never
# installed, with the exception of testthat, knitr, and rmarkdown. The cache is
# never used to avoid accidentally restoring a cache containing a suggested
# dependency.
on:
push:
branches: [main]
pull_request:
branches: [main]

name: R-CMD-check-hard

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-18.04, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"'
cache: false
extra-packages: |
any::rcmdcheck
any::testthat
any::knitr
any::rmarkdown
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
7 changes: 7 additions & 0 deletions R/stats-htest-tidiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ augment_chisq_test <- function(x, ...) {
#'
#' @examples
#'
#' # feel free to ignore the following line—it allows {broom} to supply
#' # examples without requiring the data-supplying package to be installed.
#' if (requireNamespace("modeldata", quietly = TRUE)) {
#'
#' attach(airquality)
#' Month <- factor(Month, labels = month.abb[5:9])
#' ptt <- pairwise.t.test(Ozone, Month)
Expand All @@ -195,6 +199,9 @@ augment_chisq_test <- function(x, ...) {
#' tidy(pairwise.t.test(compounds, class, alternative = "less"))
#'
#' tidy(pairwise.wilcox.test(compounds, class))
#'
#' }
#'
#' @export
#' @seealso [stats::pairwise.t.test()], [stats::pairwise.wilcox.test()],
#' [tidy()]
Expand Down
9 changes: 8 additions & 1 deletion R/stats-prcomp-tidiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@
#' that SVD is only equivalent to PCA on centered data.
#'
#' @examples
#'
#'
#' # feel free to ignore the following line—it allows {broom} to supply
#' # examples without requiring the data-supplying package to be installed.
#' if (requireNamespace("maps", quietly = TRUE)) {
#'
#' pc <- prcomp(USArrests, scale = TRUE)
#'
#' # information about rotation
Expand All @@ -70,6 +74,7 @@
#' # state map
#' library(dplyr)
#' library(ggplot2)
#' library(maps)
#'
#' pc %>%
#' tidy(matrix = "samples") %>%
Expand All @@ -89,6 +94,8 @@
#' geom_point() +
#' geom_text(aes(label = .rownames), vjust = 1, hjust = 1)
#'
#' }
#'
#' @aliases prcomp_tidiers
#' @export
#' @seealso [stats::prcomp()], [svd_tidiers]
Expand Down
7 changes: 7 additions & 0 deletions man/tidy.pairwise.htest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions man/tidy.prcomp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/testthat/test-stats-mlm.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ context("stats-mlm")

skip_on_cran()

skip_if_not_installed("modeltests")
library(modeltests)

fit_mlm <- lm(cbind(mpg, disp) ~ wt, mtcars)
df_tidy <- tidy(fit_mlm, conf.int = TRUE)

Expand Down

0 comments on commit eef704e

Please sign in to comment.