Skip to content

Commit

Permalink
skip some tests on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
bschilder committed Dec 29, 2023
1 parent 42a1b34 commit 185409b
Show file tree
Hide file tree
Showing 18 changed files with 316 additions and 283 deletions.
546 changes: 273 additions & 273 deletions .Rhistory

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

## New features

- Change command "\nodocker" to "[nodocker]" for consistency with other commands.
* Change command "\nodocker" to "[nodocker]" for consistency with other commands.

## Bug fixes

- *action.yml*
* *action.yml*
- `repository: ${{ github.repository }}` --> `repository: ${{ env.packageName }}`
* CRAN:
- Add convenient `testthat` functions `skip_on_cran()` and `skip_if_offline`.
* Reduce package size by making vignettes `rmarkdown::html_vignette`
instead of `BiocStyle::html_document`.

# rworkflows 1.0.0

Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-bioc_r_versions.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test_that("bioc_r_versions works", {
## Don't run on CRAN servers due to ongoing internet connectivity issues
testthat::skip_on_cran()
testthat::skip_if_offline()

ver1 <- bioc_r_versions(bioc_version="devel")
testthat::expect_true(ver1$bioc>="3.17")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-check_cont.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test_that("check_cont works", {
## Don't run on CRAN servers due to ongoing internet connectivity issues
testthat::skip_on_cran()
testthat::skip_if_offline()

testthat::expect_no_warning(
check_cont(cont = "bioconductor/bioconductor_docker:devel")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-check_r_version.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test_that("check_r_version works", {
## Don't run on CRAN servers due to ongoing internet connectivity issues
testthat::skip_on_cran()
testthat::skip_if_offline()

testthat::expect_equal(
check_r_version(r = "4.1"),
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-construct_conda_yml.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ test_that("construct_conda_yml works", {
save_path = save_path)
testthat::expect_true(file.exists(path2))

## Don't run on CRAN servers due to ongoing internet connectivity issues
testthat::skip_on_cran()
testthat::skip_if_offline()

# conda <- conda_path()
out <- reticulate::conda_create(environment = path2,
envname = envname)
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-construct_cont.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ test_that("construct_cont works", {
testthat::expect_null(cont3[[2]])
testthat::expect_null(cont3[[3]])

## Don't run on CRAN servers due to ongoing internet connectivity issues
testthat::skip_on_cran()
testthat::skip_if_offline()

cont4 <- construct_cont(default_tag = "release",
default_registry = "ghcr.io",
run_check_cont = TRUE)
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-construct_runners.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test_that("construct_runners works", {
## Don't run on CRAN servers due to ongoing internet connectivity issues
testthat::skip_on_cran()
testthat::skip_if_offline()

#### Set up tests ####
run_tests <- function(runners){
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-get_yaml.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("get_yaml works", {
testthat::skip_if_offline()

testthat::expect_type(
rworkflows:::get_yaml(template = "rworkflows"),
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-gha_python_versions.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test_that("gha_python_versions works", {
## Don't run on CRAN servers due to ongoing internet connectivity issues
testthat::skip_on_cran()
testthat::skip_if_offline()

testthat::expect_equal(gha_python_versions(python_version = "3.11"),"3.11")
testthat::expect_equal(gha_python_versions(python_version = "3.x"),"3.x")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-url_exists.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test_that("url_exists works", {
## Don't run on CRAN servers due to ongoing internet connectivity issues
testthat::skip_on_cran()
testthat::skip_if_offline()

testthat::expect_true(
rworkflows:::url_exists("https://github.com/neurogenomics/rworkflows")
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-use_badges.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("use_badges works", {

testthat::skip_if_offline()

run_tests <- function(badges){
testthat::expect_length(badges,1)
testthat::expect_type(badges,"character")
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-use_workflow.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("use_workflow works", {
testthat::skip_if_offline()

path <- use_workflow(save_dir = file.path(tempdir(),".github","workflows"))
testthat::expect_true(file.exists(path))
Expand Down
2 changes: 1 addition & 1 deletion vignettes/bioconductor.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Bioconductor"
author: "<h4>Authors: <i>`r auths <- eval(parse(text = gsub('person','c',read.dcf('../DESCRIPTION', fields = 'Authors@R'))));paste(auths[names(auths)=='given'],auths[names(auths)=='family'], collapse = ', ')`</i></h4>"
date: "<h4>Vignette updated: <i>`r format( Sys.Date(), '%b-%d-%Y')`</i></h4>"
output:
BiocStyle::html_document
rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Bioconductor}
%\usepackage[utf8]{inputenc}
Expand Down
6 changes: 3 additions & 3 deletions vignettes/depgraph.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Dependency graph"
author: "<h4>Authors: <i>`r auths <- eval(parse(text = gsub('person','c',read.dcf('../DESCRIPTION', fields = 'Authors@R'))));paste(auths[names(auths)=='given'],auths[names(auths)=='family'], collapse = ', ')`</i></h4>"
date: "<h4>Vignette updated: <i>`r format( Sys.Date(), '%b-%d-%Y')`</i></h4>"
output:
BiocStyle::html_document
rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{depgraph}
%\usepackage[utf8]{inputenc}
Expand Down Expand Up @@ -51,13 +51,13 @@ saveRDS(res, here::here("reports","dep_graph_res.rds"))

## Count stars/clones/views

``` r
```r
knitr::kable(res$report)
```

# Show

![rworkflow depgraph](https://github.com/neurogenomics/rworkflows/raw/master/reports/rworkflows_depgraph.png)
## [rworkflow depgraph](https://github.com/neurogenomics/rworkflows/raw/master/reports/rworkflows_depgraph.png)

Hover over each node to show additional metadata.

Expand Down
2 changes: 1 addition & 1 deletion vignettes/docker.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author: '<h4>Authors: <i>`r auths <- eval(parse(text = gsub("person","c",read.dc
collapse = ", ")`</i></h4>'
date: '<h4>Vignette updated: <i>`r format( Sys.Date(), "%b-%d-%Y")`</i></h4>'
output:
BiocStyle::html_document:
rmarkdown::html_vignette:
md_extensions: -autolink_bare_uris
params:
cont:
Expand Down
2 changes: 1 addition & 1 deletion vignettes/repos.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ r_repos_res <- echogithub::r_repos(
width = 9)
```

[!Upset plot](https://github.com/neurogenomics/rworkflows/raw/master/reports/r_repos_upset.pdf)
## [Upset plot](https://github.com/neurogenomics/rworkflows/raw/master/reports/r_repos_upset.pdf)

## Save results

Expand Down
2 changes: 1 addition & 1 deletion vignettes/rworkflows.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Get Started"
author: "<h4>Authors: <i>`r auths <- eval(parse(text = gsub('person','c',read.dcf('../DESCRIPTION', fields = 'Authors@R'))));paste(auths[names(auths)=='given'],auths[names(auths)=='family'], collapse = ', ')`</i></h4>"
date: "<h4>Vignette updated: <i>`r format( Sys.Date(), '%b-%d-%Y')`</i></h4>"
output:
BiocStyle::html_document
rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{rworkflows}
%\usepackage[utf8]{inputenc}
Expand Down

0 comments on commit 185409b

Please sign in to comment.