Skip to content

Commit

Permalink
Add tidyverse as a default package for the R tester (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
pretendWhale committed Apr 26, 2024
1 parent 9c4c641 commit 7a56e41
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
All notable changes to this project will be documented here.

## [unreleased]
- Add tidyverse as a default R tester package (#512)

## [v2.4.2]
- Ensure _env_status is updated to "setup" earlier when a request to update test settings is made (#499)
Expand Down
13 changes: 12 additions & 1 deletion server/.dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ RUN apt-get update -y && \
postgresql-client \
libpq-dev \
sudo \
git
git \
libfontconfig1-dev \
libcurl4-openssl-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
libharfbuzz-dev \
libfribidi-dev \
r-base

RUN useradd -ms /bin/bash $LOGIN_USER && \
usermod -aG sudo $LOGIN_USER && \
Expand All @@ -45,6 +54,8 @@ RUN python3.11 -m venv /markus_venv && \
find /app/autotest_server/testers -name requirements.system -exec {} \; && \
rm -rf /app/*

RUN echo "TZ=$( cat /etc/timezone )" >> /etc/R/Renviron.site

RUN mkdir -p ${WORKSPACE} && chown ${LOGIN_USER} ${WORKSPACE}

WORKDIR /home/${LOGIN_USER}
Expand Down
9 changes: 7 additions & 2 deletions server/autotest_server/testers/r/lib/r_tester_setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ library(remotes)
main <- function() {
# Tester dependencies
# rjson v0.2.20 is required to support R v3.x
deps <- "testthat, rjson (== 0.2.20)"
deps <- "testthat, rjson (== 0.2.20), stringi, tidyverse"

# Additional dependencies for test environment from command-line args
args <- commandArgs(TRUE)
Expand Down Expand Up @@ -53,7 +53,12 @@ install_dep <- function(row) {
} else if (!is.na(version)) {
install_version(name, version = paste(compare, version, sep =" "))
} else {
install.packages(name)
if (name == 'stringi') {
install.packages(name, configure.args="--disable-pkg-config")
}
else {
install.packages(name)
}
}

if (!(name %in% installed.packages())) {
Expand Down

0 comments on commit 7a56e41

Please sign in to comment.