forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
83 lines (60 loc) · 2.36 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
language: php
env:
global:
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache
- SYLIUS_BUILD_DIR=etc/build
cache:
directories:
- bin
- vendor
- $SYLIUS_CACHE_DIR
sudo: false
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
matrix:
include:
- php: 5.6
services: [memcached, mongodb]
- php: 7.0
services: [memcached]
- php: 5.5
services: [memcached, mongodb]
before_install:
- mkdir -p $SYLIUS_CACHE_DIR
- phpenv config-rm xdebug.ini || true
- etc/travis/prepare-memcached-extension
- phpenv config-add etc/travis/before-install-php.ini
- composer self-update
# Add Github OAuth token to Composer config if that variable exists
- if [[ ! -z "$GITHUB_OAUTH_TOKEN" ]]; then composer config -g github-oauth.github.com "$GITHUB_OAUTH_TOKEN" >/dev/null 2>&1; fi
- etc/travis/prepare-composer-doctrine-mongodb-odm
- composer install --no-interaction --prefer-dist --no-scripts
- composer run-script travis-build --no-interaction
before_script:
- phpenv config-add etc/travis/before-install-php.ini
- app/console doctrine:database:create --env=test_cached
- app/console cache:warmup --env=test_cached --no-debug
- app/console doctrine:schema:create --env=test_cached
- app/console doctrine:phpcr:repository:init --env=test_cached
- app/console assets:install --env=test_cached --no-debug
- app/console assetic:dump --env=test_cached --no-debug
# Debug informations, PHP version & PHP configuration
# Its needed to remove the line with secret ariable, as it is listed in _SERVER variables
- php -v
- php -i | grep -v GITHUB_OAUTH_TOKEN
script:
- bin/phpspec run -f dot
- bin/phpunit
- bin/behat --strict -f progress -p cached
- etc/travis/prepare-javascript
- bin/behat --strict -f progress -p javascript_cached || bin/behat --strict -f progress -p javascript_cached --rerun
before_cache:
- yes 'Y' | rm -fr vendor/symfony-cmf/create-bundle/Resources/public/vendor/*
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"