refactor and add testing

This commit is contained in:
Minghe Huang
2017-11-24 12:23:04 +08:00
parent dbefe38dd6
commit 7af6a9b311
3 changed files with 5 additions and 4 deletions

View File

@@ -44,9 +44,10 @@ jobs:
fx up examples/functions/func.go >> deploy.log
fx up examples/functions/func.php >> deploy.log
fx up examples/functions/func.jl >> deploy.log
fx up examples/functions/func.R >> deploy.log
cat server_output.log
cat deploy.log;
cat deploy.log | grep 'Succed: 1' | wc -l | grep 6
cat deploy.log | grep 'Succed: 1' | wc -l | grep 7
deployment:
production:

View File

@@ -1,10 +1,8 @@
FROM r-base
RUN echo 'install.packages(c("jug", "jsonlite"), repos="http://cran.us.r-project.org", dependencies=TRUE)' > /tmp/packages.R \
&& Rscript /tmp/packages.R
COPY . /usr/local/src/fx
WORKDIR /usr/local/src/fx
RUN Rscript packages.R
CMD ["Rscript", "app.R"]
EXPOSE 3000

2
images/R/packages.R Normal file
View File

@@ -0,0 +1,2 @@
install.packages(c("jug"))
install.packages(c("jsonlite"))