Skip to content

Commit

Permalink
Merge pull request #217 from pamil/1.0-travis
Browse files Browse the repository at this point in the history
Fix Travis configuration
  • Loading branch information
pamil authored Feb 2, 2018
2 parents 3b4af7a + e85f328 commit 85d86ef
Show file tree
Hide file tree
Showing 2 changed files with 599 additions and 334 deletions.
42 changes: 17 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,32 @@ language: php

dist: trusty

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

sudo: required
sudo: false

php:
- 7.1

services:
- memcached
- 7.2

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

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

services:
- memcached

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
Expand All @@ -56,8 +46,8 @@ before_script:

# Download and configure ChromeDriver
- |
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ]; then
curl http://chromedriver.storage.googleapis.com/2.30/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 @@ -68,7 +58,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 All @@ -80,6 +70,8 @@ before_script:
- 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:
- composer validate --strict

- bin/phpspec run --no-interaction -f dot

- echo "Testing (Behat - brand new, regular scenarios; ~@javascript && ~@todo && ~@cli)" "Sylius"
Expand Down
Loading

0 comments on commit 85d86ef

Please sign in to comment.