diff --git a/.travis.yml b/.travis.yml index 34e54ba..5529917 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ -sudo: required language: php +sudo: false php: - 5.6 env: @@ -16,7 +16,7 @@ services: - docker before_install: - export PATH="$HOME/.config/composer/vendor/bin:$PATH" -- "([ ! -z $BUILD_WEBDRIVERIO ] && sudo pip install docker-compose) || :" +- "([ ! -z $BUILD_WEBDRIVERIO ] && pip install --user docker-compose) || :" - openssl aes-256-cbc -K $encrypted_b2dc5bc8fb77_key -iv $encrypted_b2dc5bc8fb77_iv -in gdrive-service-account.json.enc -out gdrive-service-account.json -d install: @@ -34,5 +34,4 @@ script: cache: directories: - client/elm-stuff/packages - - client/sysconfcpus - travis-cache diff --git a/ci-scripts/docker_files/preparing_client.sh b/ci-scripts/docker_files/preparing_client.sh index 7df3246..46f3515 100644 --- a/ci-scripts/docker_files/preparing_client.sh +++ b/ci-scripts/docker_files/preparing_client.sh @@ -10,16 +10,10 @@ fi # Various dependencies to complete the steps below. # bzip2: uncompress phantomjs -# g++4.8 - Fibers issue -apt-get -y install g++-4.8 bzip2 -# Fibers Node 7.x issue: https://github.com/laverdet/node-fibers/issues/331 -export CXX=g++-4.8 +apt-get -y install bzip2 # Install global packages. npm install -g elm@~0.18.0 -npm install -g elm-test -npm install -g bower -npm install -g gulp cd "$ROOT_DIR"/client || exit 1 npm install @@ -28,18 +22,6 @@ bower install --allow-root elm-package install -y cp "$ROOT_DIR"/ci-scripts/docker_files/LocalConfig.elm src/elm/LocalConfig.elm -# Getting elm-make to run quicker. -# See https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142 -if [ ! -d sysconfcpus/bin ]; -then - git clone https://github.com/obmarg/libsysconfcpus.git; - cd libsysconfcpus || exit; - ./configure --prefix="$ROOT_DIR"/sysconfcpus; - make && make install; - pwd - cd ..; -fi - # Since we updated the JAVA version we should rebuild the node-sass. npm rebuild node-sass # Run gulp in the background. diff --git a/ci-scripts/docker_files/run_webdriverio.sh b/ci-scripts/docker_files/run_webdriverio.sh index e9a6017..0271877 100644 --- a/ci-scripts/docker_files/run_webdriverio.sh +++ b/ci-scripts/docker_files/run_webdriverio.sh @@ -25,7 +25,7 @@ for SPEC in test/specs/*js; do SPEC_BASENAME=$(echo "$SPEC" | cut -d '/' -f 3 | cut -d '.' -f 1) sed "s/<>/$SPEC_BASENAME/" < $WDIO_CONF.orig > "$WDIO_CONF" for i in $(seq 3); do - ./node_modules/.bin/wdio "$WDIO_CONF" --spec "$SPEC" + wdio "$WDIO_CONF" --spec "$SPEC" WDIO_RET=$? if [[ "$WDIO_RET" -eq 0 ]]; then # We give 3 chances to complete diff --git a/ci-scripts/install_client.sh b/ci-scripts/install_client.sh index a6c592d..b188eda 100755 --- a/ci-scripts/install_client.sh +++ b/ci-scripts/install_client.sh @@ -20,15 +20,3 @@ npm install -g elm-test@0.18.2 cd "$TRAVIS_BUILD_DIR"/client elm-package install -y - -# Getting elm-make to run quicker. -# See https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142 -if [ ! -d sysconfcpus/bin ]; -then - git clone https://github.com/obmarg/libsysconfcpus.git; - cd libsysconfcpus || exit; - ./configure --prefix="$TRAVIS_BUILD_DIR"/sysconfcpus; - make && make install; - pwd - cd ..; -fi diff --git a/ci-scripts/prepare_client.sh b/ci-scripts/prepare_client.sh index 3f89342..614b061 100755 --- a/ci-scripts/prepare_client.sh +++ b/ci-scripts/prepare_client.sh @@ -12,5 +12,5 @@ if [ -z "${BUILD_CLIENT+x}" ] || [ "$BUILD_CLIENT" -ne 1 ]; then exit 0; fi -"$TRAVIS_BUILD_DIR"/sysconfcpus/bin/sysconfcpus -n 2 elm-make --yes +/usr/bin/sysconfcpus -n 2 elm-make --yes cp ./client/src/elm/LocalConfig.Example.elm ./client/src/elm/LocalConfig.elm diff --git a/ci-scripts/test_server.sh b/ci-scripts/test_server.sh index d896194..da7bea0 100755 --- a/ci-scripts/test_server.sh +++ b/ci-scripts/test_server.sh @@ -30,10 +30,10 @@ cd ci-scripts/docker_files # Docker-compose up won't return with non-zero exit code if one of the # containers failed, we need to inspect it like this. # from http://blog.ministryofprogramming.com/docker-compose-and-exit-codes/ -docker-compose --file=docker-compose.yml ps -q server.local | xargs docker inspect -f '{{ .State.ExitCode }}' | while read -r code; do +~/.local/bin/docker-compose --file=docker-compose.yml ps -q server.local | xargs docker inspect -f '{{ .State.ExitCode }}' | while read -r code; do if [ ! "$code" = "0" ]; then source "$TRAVIS_BUILD_DIR"/server/travis.config.sh - sudo chmod -R 777 /tmp/test_results + chmod -R 777 /tmp/test_results echo "One of the containers exited with $code" VID_COUNT=$(find "$VIDEO_DIR" -type f -name '*mp4' -printf '.' | wc -c) diff --git a/client/package.json b/client/package.json index c8fc67e..d53bd0e 100644 --- a/client/package.json +++ b/client/package.json @@ -4,7 +4,6 @@ "version": "0.1.0", "description": "Generated elm", "dependencies": { - "webdriverio": "^4.6.2" }, "devDependencies": { "browser-sync": "2.18.2", @@ -36,10 +35,6 @@ "gulp-useref": "1.3.0", "jshint-stylish": "1.0.2", "merge-stream": "0.1.8", - "wdio-browserstack-service": "0.1.4", - "wdio-mocha-framework": "0.5.8", - "wdio-selenium-standalone-service": "0.0.7", - "wdio-spec-reporter": "0.0.5", "wiredep": "2.2.2" }, "engines": { diff --git a/client/test/package.json b/client/test/package.json new file mode 100644 index 0000000..3b83a21 --- /dev/null +++ b/client/test/package.json @@ -0,0 +1,20 @@ +{ + "name": "wdio-test", + "private": false, + "version": "0.1.0", + "description": "WDIO test", + "dependencies": { + "webdriverio": "^4.6.2" + }, + "devDependencies": { + "browser-sync": "2.18.2", + "wdio-browserstack-service": "0.1.4", + "wdio-mocha-framework": "0.5.8", + "wdio-selenium-standalone-service": "0.0.7", + "wdio-spec-reporter": "0.0.5" + }, + "engines": { + "node": ">0.10.0" + }, + "scripts": {} +}