Skip to content

Commit

Permalink
Make Travis passing again
Browse files Browse the repository at this point in the history
  • Loading branch information
pamil committed Jan 31, 2018
1 parent 9042215 commit 60954be
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,36 @@ language: php

dist: trusty

sudo: required
sudo: false

php:
- 7.1
- 7.2

cache:
yarn: true
directories:
- ~/.composer/cache/files
- $SYLIUS_CACHE_DIR
yarn: true

env:
global:
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache
- SYLIUS_BUILD_DIR=etc/build
- TRAVIS_NODE_VERSION="7.5"

before_install:
- phpenv config-rm xdebug.ini || true
- phpenv config-rm xdebug.ini
- echo "memory_limit=4096M" >> ~/.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
- mkdir -p "${SYLIUS_CACHE_DIR}"

install:
- composer update --prefer-dist
- composer install --no-interaction --prefer-dist
- (cd tests/Application && yarn install)

before_script:
- (cd tests/Application && bin/console doctrine:schema:create --env=test)
- (cd tests/Application && bin/console assets:install web --env=test)
- (cd tests/Application && bin/console doctrine:database:create --env=test -vvv)
- (cd tests/Application && bin/console doctrine:schema:create --env=test -vvv)
- (cd tests/Application && bin/console assets:install web --env=test -vvv)
- (cd tests/Application && yarn run gulp)

# Configure display
Expand All @@ -48,8 +40,8 @@ before_script:

# Download and configure ChromeDriver
- |
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ]; then
curl http://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip > chromedriver.zip
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c 2.34)" = "0" ]; then
curl http://chromedriver.storage.googleapis.com/2.34/chromedriver_linux64.zip > chromedriver.zip
unzip chromedriver.zip
chmod +x chromedriver
mv chromedriver $SYLIUS_CACHE_DIR
Expand All @@ -60,7 +52,7 @@ before_script:

# Download and configure Selenium
- |
if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ]; then
if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ] || [ "$(java -jar $SYLIUS_CACHE_DIR/selenium.jar --version | grep -c 3.4.0)" = "0" ]; 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
Expand Down

0 comments on commit 60954be

Please sign in to comment.