Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

WIP: Frontend tools from Drupal Lamp #118

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo: required
language: php
sudo: false
php:
- 5.6
env:
Expand All @@ -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:
Expand All @@ -34,5 +34,4 @@ script:
cache:
directories:
- client/elm-stuff/packages
- client/sysconfcpus
- travis-cache
20 changes: 1 addition & 19 deletions ci-scripts/docker_files/preparing_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/docker_files/run_webdriverio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/<<SPECNAME>>/$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
Expand Down
12 changes: 0 additions & 12 deletions ci-scripts/install_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,3 @@ npm install -g [email protected]

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
2 changes: 1 addition & 1 deletion ci-scripts/prepare_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions ci-scripts/test_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"version": "0.1.0",
"description": "Generated elm",
"dependencies": {
"webdriverio": "^4.6.2"
},
"devDependencies": {
"browser-sync": "2.18.2",
Expand Down Expand Up @@ -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": {
Expand Down
20 changes: 20 additions & 0 deletions client/test/package.json
Original file line number Diff line number Diff line change
@@ -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": {}
}