New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis-native test executions and headless Chrome #165

Merged
merged 52 commits into from Nov 25, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+223 −439
Diff settings

Always

Just for now

View
@@ -1,7 +1,11 @@
sudo: required
language: php
php:
- 5.6
- 7.0
addons:
hosts:
- server.local
chrome: stable
env:
matrix:
- BUILD_SERVER=1
@@ -17,25 +21,24 @@ services:
- docker
before_install:
- export PATH="$HOME/.config/composer/vendor/bin:$PATH"
- "([ ! -z $BUILD_WEBDRIVERIO ] && sudo pip install 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:
- "$TRAVIS_BUILD_DIR/ci-scripts/install_client.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_coder.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_server.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_webdriverio.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_shell.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_elm_format.sh"
before_script:
- "$TRAVIS_BUILD_DIR/ci-scripts/prepare_client.sh"
script:
- "$TRAVIS_BUILD_DIR/ci-scripts/test_client.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_coder.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_server.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_webdriverio.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_simpletest.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_shell.sh"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_elm_format.sh"
cache:
directories:
- client/elm-stuff/packages
- client/sysconfcpus
- travis-cache
- /tmp/travis-cache
@@ -7,7 +7,7 @@ import Pusher.Model exposing (Cluster(..), PusherAppKey)
local : Model
local =
{ backendUrl = "http://server.local"
{ backendUrl = "http://server.local:8080"
, debug = True
, name = "local"
, pusherKey = PusherAppKey "" UsEast1
View
@@ -1,15 +1,12 @@
# CI
## Test CI execution on local
1. `cd <repository_root>`
2. `docker build -t server -f ci-scripts/docker_files/Dockerfile .`
3. Client: `mkdir /tmp/travis-cache && docker run -v /tmp/travis-cache:/tmp/travis-cache -it -p 8080:80 -e BUILD_CLIENT=1 server`
4. Server: `cd ci-scripts/docker_files && export BUILD_WEBDRIVERIO=1 && docker-compose up`
## Debug CI execution
Apart from simply executing the same what Travis executes, you have the ability to inspect the container interactively after rthe execution if you start your container with an extra environment variable:
https://docs.travis-ci.com/user/running-build-in-debug-mode/
Apart from this, the recommended way to debug a certain part, is to setup the environment variables and execute it natively at localhost.
Examples:
```
mkdir /tmp/travis-cache
docker run -v /tmp/travis-cache:/tmp/travis-cache -it -p 8080:80 -e BUILD_WEBDRIVERIO=1 -e DOCKER_DEBUG=1 server
export BUILD_CLIENT=1 && TRAVIS_BUILD_DIR=/path/to/repo && bash ci/test_client.sh
```

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -24,4 +24,4 @@ function check_last_command() {
fi
}
export ROOT_DIR="/var/www/html/Server"
export ROOT_DIR="$TRAVIS_BUILD_DIR"
@@ -19,8 +19,10 @@ npm install -g elm@~0.18.0
npm install -g elm-test@0.18.2
cd "$TRAVIS_BUILD_DIR"/client
cp ../ci-scripts/LocalConfig.elm src/elm/LocalConfig.elm
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 ];
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.