2018-10-04 01:53:11 +08:00
|
|
|
#!/bin/bash
|
|
|
|
set -ev
|
|
|
|
|
|
|
|
files=`git diff --name-only HEAD..$TRAVIS_BRANCH`
|
|
|
|
if [[ $files = *"bigbluebutton-html5"* ]]; then
|
2018-11-20 07:32:15 +08:00
|
|
|
cd bigbluebutton-html5
|
|
|
|
curl https://install.meteor.com/ | sh
|
|
|
|
meteor npm install
|
|
|
|
if [ $1 = linter ]
|
|
|
|
then
|
2018-11-22 05:05:40 +08:00
|
|
|
html5_files=""
|
|
|
|
list=$(echo $files | tr " " "\n")
|
|
|
|
for file in $list
|
|
|
|
do
|
|
|
|
if [[ $file = bigbluebutton-html5* ]] ; then
|
|
|
|
html5_files+=" $file"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2018-11-20 07:32:15 +08:00
|
|
|
cd ..
|
2018-11-22 05:05:40 +08:00
|
|
|
bigbluebutton-html5/node_modules/.bin/eslint --ext .jsx,.js $html5_files
|
2018-11-20 07:32:15 +08:00
|
|
|
elif [ $1 = acceptance_tests ]
|
|
|
|
then
|
|
|
|
{
|
|
|
|
git clone --single-branch -b update-html5 https://github.com/bigbluebutton/docker.git
|
|
|
|
cp -r docker/{mod,restart.sh,setup.sh,supervisord.conf} .
|
|
|
|
cp -r docker/Dockerfile Dockerfile.test
|
|
|
|
docker build -t b2 -f Dockerfile.test .
|
|
|
|
docker=$(docker run -d -p 80:80/tcp -p 443:443/tcp -p 1935:1935 -p 5066:5066 -p 3478:3478 -p 3478:3478/udp b2 -h localhost)
|
|
|
|
echo $docker
|
|
|
|
} > /dev/null
|
|
|
|
|
2018-11-24 02:23:55 +08:00
|
|
|
cd tests/puppeteer/core
|
2018-10-19 02:10:19 +08:00
|
|
|
conf=$(docker exec $(docker ps -q) bbb-conf --secret | grep "Secret:")
|
|
|
|
secret=$(echo $conf | cut -d' ' -f2)
|
|
|
|
export BBB_SHARED_SECRET=$secret
|
2018-11-20 07:32:15 +08:00
|
|
|
node html5-check.js
|
2018-11-24 02:59:31 +08:00
|
|
|
cd ../../..
|
2018-11-20 07:32:15 +08:00
|
|
|
npm test
|
|
|
|
fi
|
2018-10-04 01:53:11 +08:00
|
|
|
fi
|