Skip to content
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] Running JavaScript tests #3055

Merged
merged 10 commits into from
Sep 17, 2015
Merged
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ bin/*
vendor

deploy/deploy.rb
deploy/stages/*.rb
deploy/stages/*.rb

travis/build-output/*
!travis/build-output/.gitkeep
49 changes: 35 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
language: php

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

cache:
directories:
- bin
- vendor
- $HOME/.composer/cache
- $SYLIUS_CACHE_DIR

sudo: false

matrix:
Expand All @@ -8,42 +20,51 @@ matrix:
include:
- php: 5.6
env: TEST_SUITE=1
services: [mongodb]
- php: 5.6
env: TEST_SUITE=2

- php: 5.5
env: TEST_SUITE=1
- php: 5.5
env: TEST_SUITE=2
- php: 5.6
env: TEST_SUITE=javascript
sudo: required

- php: 7.0
env: TEST_SUITE=1
- php: 7.0
env: TEST_SUITE=2

allow_failures:
- php: 7.0

services:
- mongodb
- php: 5.5
env: TEST_SUITE=1
services: [mongodb]
- php: 5.5
env: TEST_SUITE=2

before_install:
- mkdir -p $SYLIUS_CACHE_DIR

- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "zend.enable_gc = 0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

- composer self-update
- if [ $TRAVIS_PHP_VERSION != "7.0" ] && [ $TEST_SUITE = 1 ]; then travis/prepare/prepare-mongodb; fi
- composer install --prefer-source --no-interaction
- composer require doctrine/mongodb-odm="1.0.*@dev" --no-update
- composer require jmikola/geojson="~1.0" --no-update
- composer update doctrine/mongodb-odm jmikola/geojson --prefer-source --no-interaction $COMPOSER_FLAGS

- if [ $TEST_SUITE = "javascript" ]; then travis/prepare/prepare-javascript; fi

before_script:
- app/console doctrine:database:create --env=test
- app/console doctrine:schema:create --env=test
- app/console doctrine:phpcr:repository:init --env=test

- app/console cache:warmup --env=test

- if [ $TEST_SUITE = "javascript" ]; then app/console assets:install --env=test; fi
- if [ $TEST_SUITE = "javascript" ]; then app/console assetic:dump --env=test; fi

script:
- travis/run-tests $TEST_SUITE

after_failure:
- export IMGUR_API_KEY=4907fcd89e761c6b07eeb8292d5a9b2a
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "$SYLIUS_BUILD_DIR/*.log"
- vendor/lakion/mink-debug-extension/travis/tools/upload-screenshots "$SYLIUS_BUILD_DIR/*.png"
23 changes: 17 additions & 6 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@ default:
tags: "@security"

extensions:
Lakion\Behat\MinkDebugExtension:
directory: travis/build-output
clean_start: false
Behat\MinkExtension:
sessions:
default:
Expand All @@ -410,13 +413,21 @@ default:

javascript:
extensions:
Lakion\Behat\MinkDebugExtension:
screenshot: true
Behat\MinkExtension:
base_url: # enter your base url here
sessions:
javascript:
selenium2: ~
browser_name: firefox
show_auto: false
base_url: http://localhost:8080/
selenium2:
capabilities:
browserName: chrome
browser: chrome
version: ""
chrome:
switches:
- "start-fullscreen"
- "no-sandbox"
browser_name: chrome
show_auto: false

gherkin:
filters:
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"behat/mink": "~1.6",
"coduo/php-matcher": "~1.0",
"phpspec/phpspec": "~2.1",
"phpunit/phpunit": "~4.1"
"phpunit/phpunit": "~4.1",
"lakion/mink-debug-extension": "^1.0.1"
},
"replace": {
"sylius/addressing": "self.version",
Expand Down
112 changes: 84 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading