https://github.com/ctlab/phantasus
Revision 42ad7140da8240590b348d8412cce03edca74f48 authored by Rita Sablina on 03 March 2018, 18:02:21 UTC, committed by Rita Sablina on 03 March 2018, 18:02:21 UTC
2 parent s a7489d6 + 533132f
Raw File
Tip revision: 42ad7140da8240590b348d8412cce03edca74f48 authored by Rita Sablina on 03 March 2018, 18:02:21 UTC
Merge branch 'r-3.4' of https://github.com/rsablina/phantasus into r-3.4
Tip revision: 42ad714
test_js.sh
#!/bin/bash
R -e "devtools::install('.')"

cd inst/www/phantasus.js/
npm install karma --save-dev
npm install

mkdir "jasmine/cache"
R -e "phantasus::getES('GSE53986', destdir='jasmine/cache')"

R -e "phantasus::servePhantasus('0.0.0.0', 8000, cacheDir = 'jasmine/cache', preloadedDir = 'jasmine/cache', openInBrowser=FALSE)" &
PH_PID=$!

sleep 2

./node_modules/karma/bin/karma start my.conf.js --single-run
RETVAL=$?

cd

function finish {
    kill $PH_PID
    echo "Killed OpenCPU-server"
}
trap finish EXIT

if [ $RETVAL -eq 0 ]
then
    echo "Jasmine tests are successfully passed"
    exit 0
else
    echo "Tests failed" >&2
    exit 1
fi



back to top