-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (70 loc) · 3.65 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
language: php
dist: trusty
env:
global:
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache
- SYLIUS_BUILD_DIR=etc/build
- TRAVIS_NODE_VERSION="7.5"
sudo: required
php:
- 7.1
services:
- memcached
cache:
directories:
- vendor
- bin
- node_modules
- $SYLIUS_CACHE_DIR
before_install:
- phpenv config-rm xdebug.ini || true
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Install Node Version Manager to install newer node version
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout $(git describe --abbrev=0 --tags)) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
# Install Yarn globally
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update -qq
- sudo apt-get install -y -qq yarn=0.21.3-1
install:
- composer install --no-interaction --prefer-dist
- yarn install
before_script:
- bin/console doctrine:database:create --env=test_cached -vvv # Have to be run with debug = true, to omit generating proxies before setting up the database
- bin/console cache:warmup --env=test_cached --no-debug -vvv
- bin/console doctrine:migrations:migrate --no-interaction --env=test_cached --no-debug -vvv
- bin/console assets:install --env=test_cached --no-debug -vvv
- yarn run gulp
# Configure display
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1680x1050x16
- export DISPLAY=:99
# Download and configure ChromeDriver
- |
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ]; then
curl http://chromedriver.storage.googleapis.com/2.30/chromedriver_linux64.zip > chromedriver.zip
unzip chromedriver.zip
chmod +x chromedriver
mv chromedriver $SYLIUS_CACHE_DIR
fi
# Run ChromeDriver
- $SYLIUS_CACHE_DIR/chromedriver > /dev/null 2>&1 &
# Download and configure Selenium
- |
if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ]; then
curl http://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar > selenium.jar
mv selenium.jar $SYLIUS_CACHE_DIR
fi
# Run Selenium
- java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 &
# Run webserver
- bin/console server:run 127.0.0.1:8080 --env=test_cached --router=app/config/router_test_cached.php --no-debug --quiet > /dev/null 2>&1 &
script:
- bin/phpspec run --no-interaction -f dot
- echo "Testing (Behat - brand new, regular scenarios; ~@javascript && ~@todo && ~@cli)" "Sylius"
- bin/behat --strict --no-interaction -vvv -f progress -p cached --tags="~@javascript && ~@todo && ~@cli"
- echo "Testing (Behat - brand new, javascript scenarios; @javascript && ~@todo && ~@cli)" "Sylius"
- bin/behat --strict --no-interaction -vvv -f progress -p cached --tags="@javascript && ~@todo && ~@cli" || bin/behat --strict --no-interaction -vvv -f progress -p cached --tags="@javascript && ~@todo && ~@cli" --rerun
after_failure:
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log"
- IMGUR_API_KEY=4907fcd89e761c6b07eeb8292d5a9b2a vendor/lakion/mink-debug-extension/travis/tools/upload-screenshots "${SYLIUS_BUILD_DIR}/*.png"