Created
September 17, 2017 16:16
Star
You must be signed in to star a gist
codeship basic check
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
check_results <- devtools::check() | |
print(check_results) | |
if (length(check_results$errors) + length(check_results$warnings) + length(check_results$notes) >= 1) { | |
stop('error, warning or note found') | |
} |
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
mkdir -p $HOME/cache/packrat/lib | |
mkdir -p $HOME/cache/packrat/lib-R | |
mkdir -p $HOME/cache/packrat/lib-ext | |
cp -r $HOME/cache/packrat/lib ./packrat/ | |
cp -r $HOME/cache/packrat/lib-R ./packrat/ | |
cp -r $HOME/cache/packrat/lib-ext ./packrat/ | |
R -e "0" --args --bootstrap-packrat | |
R -e "packrat::restore(restart = FALSE)" | |
cp -r packrat/lib $HOME/cache/packrat | |
cp -r packrat/lib-R $HOME/cache/packrat | |
cp -r packrat/lib-ext $HOME/cache/packrat |
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
R_VERSION=${R_VERSION:="3.4.1"} | |
R_PATH=${R_PATH:=$HOME/r} | |
CACHED_DOWNLOAD="${HOME}/cache/R-${R_VERSION}.tar.gz" | |
mkdir -p "${R_PATH}" | |
wget --continue --output-document "${CACHED_DOWNLOAD}" "https://cran.r-project.org/src/base/R-${R_VERSION%%.*}/R-${R_VERSION}.tar.gz";;; | |
tar -xaf "${CACHED_DOWNLOAD}" --strip-components=1 --directory "${R_PATH}" | |
export PATH="${R_PATH}/bin:${PATH}" | |
cd "${R_PATH}" || exit 1 | |
./configure | |
make | |
# check the correct version is used | |
R --version | grep "${R_VERSION}" | |
cd ~/clone | |
chmod +x codeship/cs_packrat_setup.sh | |
codeship/cs_packrat_setup.sh |
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
Rscript cs_check.R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment