-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test again GHA workflow with modifs (wip)
- Loading branch information
1 parent
fd567ad
commit bf7c7eb
Showing
1 changed file
with
163 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,175 +162,175 @@ jobs: | |
message(paste('****', Sys.time(), 'installing BiocManager ****')) | ||
remotes::install_cran("BiocManager") | ||
shell: Rscript {0} | ||
|
||
# - name: Manually install vdiffr in version 1.0.5 to avoid compil error | ||
# run: | | ||
# BiocManager::install("remotes") | ||
# remotes::install_version("vdiffr", version = "1.0.5") | ||
# shell: Rscript {0} | ||
|
||
- name: Set BiocVersion | ||
run: | | ||
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE) | ||
shell: Rscript {0} | ||
|
||
- name: Install dependencies | ||
run: | | ||
withr::with_makevars( | ||
c(CFLAGS = "-w", | ||
CXXFLAGS = "-w"), | ||
{ | ||
## Try installing the package dependencies in steps. First the local | ||
## dependencies, then any remaining dependencies to avoid the | ||
## issues described at | ||
## https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016675.html | ||
## https://github.com/r-lib/remotes/issues/296 | ||
## Ideally, all dependencies should get installed in the first pass. | ||
## Pass #1 at installing dependencies | ||
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) | ||
local_deps <- remotes::local_package_deps(dependencies = TRUE) | ||
deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) | ||
BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]]) | ||
|
||
## Pass #2 at installing dependencies | ||
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) | ||
deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) | ||
BiocManager::install(deps$package[deps$diff != 0]) | ||
|
||
## For running the checks | ||
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) | ||
remotes::install_cran("rcmdcheck") | ||
BiocManager::install("BiocCheck") | ||
}, | ||
assignment = "+=") | ||
|
||
shell: Rscript {0} | ||
|
||
- name: Session info | ||
run: | | ||
options(width = 100) | ||
pkgs <- installed.packages()[, "Package"] | ||
sessioninfo::session_info(pkgs, include_base = TRUE) | ||
shell: Rscript {0} | ||
|
||
## Fix error: The magick package is required to crop "...png" but not available. | ||
- name: Manually install magick | ||
run: BiocManager::install("magick") | ||
shell: Rscript {0} | ||
|
||
- name: Session info | ||
run: | | ||
options(width = 100) | ||
pkgs <- installed.packages()[, "Package"] | ||
sessioninfo::session_info(pkgs, include_base = TRUE) | ||
shell: Rscript {0} | ||
|
||
- name: Install BiocGenerics | ||
if: env.has_RUnit == 'true' | ||
run: | | ||
## Install BiocGenerics | ||
BiocManager::install("BiocGenerics") | ||
shell: Rscript {0} | ||
|
||
- name: Session info | ||
run: | | ||
options(width = 100) | ||
pkgs <- installed.packages()[, "Package"] | ||
sessioninfo::session_info(pkgs, include_base = TRUE) | ||
shell: Rscript {0} | ||
|
||
- name: Install covr | ||
##if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux' | ||
if: env.run_covr == 'true' && runner.os == 'Linux' | ||
run: | | ||
remotes::install_cran("covr") | ||
shell: Rscript {0} | ||
|
||
- name: Session info | ||
run: | | ||
options(width = 100) | ||
pkgs <- installed.packages()[, "Package"] | ||
sessioninfo::session_info(pkgs, include_base = TRUE) | ||
shell: Rscript {0} | ||
|
||
- name: Install pkgdown | ||
##if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
if: env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
run: | | ||
remotes::install_github("r-lib/pkgdown") | ||
shell: Rscript {0} | ||
|
||
- name: Session info | ||
run: | | ||
options(width = 100) | ||
pkgs <- installed.packages()[, "Package"] | ||
sessioninfo::session_info(pkgs, include_base = TRUE) | ||
shell: Rscript {0} | ||
|
||
- name: Run CMD check | ||
env: | ||
_R_CHECK_CRAN_INCOMING_: false | ||
- pre-install cytolib | ||
run: | | ||
rcmdcheck::rcmdcheck( | ||
args = c("--no-build-vignettes", "--no-manual", "--timings"), | ||
build_args = c("--no-manual", "--no-resave-data"), | ||
error_on = "warning", | ||
check_dir = "check" | ||
) | ||
BiocManager::install("cytolib") | ||
shell: Rscript {0} | ||
|
||
|
||
## Might need an to add this to the if: && runner.os == 'Linux' | ||
- name: Reveal testthat details | ||
if: env.has_testthat == 'true' | ||
run: find . -name testthat.Rout -exec cat '{}' ';' | ||
|
||
- name: Run RUnit tests | ||
if: env.has_RUnit == 'true' | ||
run: | | ||
BiocGenerics:::testPackage() | ||
shell: Rscript {0} | ||
|
||
- name: Run BiocCheck | ||
if: env.has_BiocCheck == 'true' | ||
run: | | ||
BiocCheck::BiocCheck( | ||
dir('check', 'tar.gz$', full.names = TRUE), | ||
`quit-with-status` = TRUE, | ||
`no-check-R-ver` = TRUE, | ||
`no-check-bioc-help` = TRUE | ||
) | ||
shell: Rscript {0} | ||
|
||
- name: Test coverage | ||
#if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux' | ||
if: env.run_covr == 'true' && runner.os == 'Linux' | ||
run: | | ||
covr::codecov(quiet = FALSE) | ||
shell: Rscript {0} | ||
|
||
- name: Install package | ||
#if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
if: env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
run: R CMD INSTALL . | ||
|
||
- name: Deploy package | ||
#if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
if: env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git config --global --add safe.directory /__w/CytoMDS/CytoMDS | ||
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)" | ||
shell: bash {0} | ||
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE) | ||
## at least one locally before this will work. This creates the gh-pages | ||
## branch (erasing anything you haven't version controlled!) and | ||
## makes the git history recognizable by pkgdown. | ||
|
||
- name: Upload check results | ||
if: failure() | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: ${{ runner.os }}-biocversion-devel-r-devel-results | ||
path: check | ||
# - name: Install dependencies | ||
# run: | | ||
# withr::with_makevars( | ||
# c(CFLAGS = "-w", | ||
# CXXFLAGS = "-w"), | ||
# { | ||
# ## Try installing the package dependencies in steps. First the local | ||
# ## dependencies, then any remaining dependencies to avoid the | ||
# ## issues described at | ||
# ## https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016675.html | ||
# ## https://github.com/r-lib/remotes/issues/296 | ||
# ## Ideally, all dependencies should get installed in the first pass. | ||
# | ||
# ## Pass #1 at installing dependencies | ||
# message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) | ||
# local_deps <- remotes::local_package_deps(dependencies = TRUE) | ||
# deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) | ||
# BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]]) | ||
# | ||
# ## Pass #2 at installing dependencies | ||
# message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) | ||
# deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) | ||
# BiocManager::install(deps$package[deps$diff != 0]) | ||
# | ||
# ## For running the checks | ||
# message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) | ||
# remotes::install_cran("rcmdcheck") | ||
# BiocManager::install("BiocCheck") | ||
# }, | ||
# assignment = "+=") | ||
# | ||
# shell: Rscript {0} | ||
# | ||
# - name: Session info | ||
# run: | | ||
# options(width = 100) | ||
# pkgs <- installed.packages()[, "Package"] | ||
# sessioninfo::session_info(pkgs, include_base = TRUE) | ||
# shell: Rscript {0} | ||
# | ||
# ## Fix error: The magick package is required to crop "...png" but not available. | ||
# - name: Manually install magick | ||
# run: BiocManager::install("magick") | ||
# shell: Rscript {0} | ||
# | ||
# - name: Session info | ||
# run: | | ||
# options(width = 100) | ||
# pkgs <- installed.packages()[, "Package"] | ||
# sessioninfo::session_info(pkgs, include_base = TRUE) | ||
# shell: Rscript {0} | ||
# | ||
# - name: Install BiocGenerics | ||
# if: env.has_RUnit == 'true' | ||
# run: | | ||
# ## Install BiocGenerics | ||
# BiocManager::install("BiocGenerics") | ||
# shell: Rscript {0} | ||
# | ||
# - name: Session info | ||
# run: | | ||
# options(width = 100) | ||
# pkgs <- installed.packages()[, "Package"] | ||
# sessioninfo::session_info(pkgs, include_base = TRUE) | ||
# shell: Rscript {0} | ||
# | ||
# - name: Install covr | ||
# ##if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux' | ||
# if: env.run_covr == 'true' && runner.os == 'Linux' | ||
# run: | | ||
# remotes::install_cran("covr") | ||
# shell: Rscript {0} | ||
# | ||
# - name: Session info | ||
# run: | | ||
# options(width = 100) | ||
# pkgs <- installed.packages()[, "Package"] | ||
# sessioninfo::session_info(pkgs, include_base = TRUE) | ||
# shell: Rscript {0} | ||
# | ||
# - name: Install pkgdown | ||
# ##if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
# if: env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
# run: | | ||
# remotes::install_github("r-lib/pkgdown") | ||
# shell: Rscript {0} | ||
# | ||
# - name: Session info | ||
# run: | | ||
# options(width = 100) | ||
# pkgs <- installed.packages()[, "Package"] | ||
# sessioninfo::session_info(pkgs, include_base = TRUE) | ||
# shell: Rscript {0} | ||
# | ||
# - name: Run CMD check | ||
# env: | ||
# _R_CHECK_CRAN_INCOMING_: false | ||
# run: | | ||
# rcmdcheck::rcmdcheck( | ||
# args = c("--no-build-vignettes", "--no-manual", "--timings"), | ||
# build_args = c("--no-manual", "--no-resave-data"), | ||
# error_on = "warning", | ||
# check_dir = "check" | ||
# ) | ||
# shell: Rscript {0} | ||
# | ||
# ## Might need an to add this to the if: && runner.os == 'Linux' | ||
# - name: Reveal testthat details | ||
# if: env.has_testthat == 'true' | ||
# run: find . -name testthat.Rout -exec cat '{}' ';' | ||
# | ||
# - name: Run RUnit tests | ||
# if: env.has_RUnit == 'true' | ||
# run: | | ||
# BiocGenerics:::testPackage() | ||
# shell: Rscript {0} | ||
# | ||
# - name: Run BiocCheck | ||
# if: env.has_BiocCheck == 'true' | ||
# run: | | ||
# BiocCheck::BiocCheck( | ||
# dir('check', 'tar.gz$', full.names = TRUE), | ||
# `quit-with-status` = TRUE, | ||
# `no-check-R-ver` = TRUE, | ||
# `no-check-bioc-help` = TRUE | ||
# ) | ||
# shell: Rscript {0} | ||
# | ||
# - name: Test coverage | ||
# #if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux' | ||
# if: env.run_covr == 'true' && runner.os == 'Linux' | ||
# run: | | ||
# covr::codecov(quiet = FALSE) | ||
# shell: Rscript {0} | ||
# | ||
# - name: Install package | ||
# #if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
# if: env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
# run: R CMD INSTALL . | ||
# | ||
# - name: Deploy package | ||
# #if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
# if: env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
# run: | | ||
# git config --global user.email "[email protected]" | ||
# git config --global user.name "GitHub Actions" | ||
# git config --global --add safe.directory /__w/CytoMDS/CytoMDS | ||
# Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)" | ||
# shell: bash {0} | ||
# ## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE) | ||
# ## at least one locally before this will work. This creates the gh-pages | ||
# ## branch (erasing anything you haven't version controlled!) and | ||
# ## makes the git history recognizable by pkgdown. | ||
# | ||
# - name: Upload check results | ||
# if: failure() | ||
# uses: actions/upload-artifact@master | ||
# with: | ||
# name: ${{ runner.os }}-biocversion-devel-r-devel-results | ||
# path: check |