-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
90 lines (81 loc) · 2.93 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
language: php
php: [5.5, 7.0, hhvm]
sudo: false
env:
global:
- TEST_SCOPE='code'
matrix:
include:
# [PHPUnit] Test symfony versions
- php: 5.5
env: |
COMPOSER_FLAGS='--prefer-stable --prefer-lowest'
PHPUNIT_COVERAGE='--coverage-text --coverage-clover=coverage.clover'
- php: 5.6
env: |
SYMFONY_VERSION=2.7.*
- php: 5.6
env: |
SYMFONY_VERSION=2.8.*
- php: 5.6
env: |
SYMFONY_VERSION=3.0.*
# [BEHAT] Test 2.8 without additionals in FF
- php: 5.5
env: |
SYMFONY_VERSION=2.8.*
TEST_SCOPE='javascript'
SYMFONY_ENVIRONMENT='test'
SYMFONY__ENABLE_ADDITIONALS='false'
addons:
firefox: "42.0"
# [BEHAT] Test 2.3 with additionals in FF
- php: 5.5
env: |
SYMFONY_VERSION=2.3.*
TEST_SCOPE='javascript'
SYMFONY_ENVIRONMENT='test'
SYMFONY__ENABLE_ADDITIONALS='true'
addons:
firefox: "42.0"
# [BEHAT] Test 3.0 with additionals in FF
- php: 5.6
env: |
SYMFONY_VERSION=3.0.*
TEST_SCOPE='javascript'
SYMFONY_ENVIRONMENT='test'
SYMFONY__ENABLE_ADDITIONALS='true'
addons:
firefox: "42.0"
allow_failures:
- { php: hhvm }
install:
# Update composer
- travis_retry composer self-update --no-interaction;
# Patch composer dependencies
- sh -c 'if [ "${SYMFONY_VERSION}" != "" ]; then composer require --no-update symfony/symfony=${SYMFONY_VERSION}; fi;';
# Install composer dependencies
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction;
# Install npm deps
- if [ "$TEST_SCOPE" = "code" ]; then travis_retry npm install grunt-cli; fi;
- if [ "$TEST_SCOPE" = "code" ]; then travis_retry npm install; fi;
# Setup behat dependencies when needed
- if [ "$TEST_SCOPE" = "javascript" ]; then tests/bootstrap-functional.sh; fi;
script:
# Run code tests
- if [ "$TEST_SCOPE" = "code" ]; then vendor/bin/phpunit ${PHPUNIT_COVERAGE}; fi;
- if [ "$TEST_SCOPE" = "code" ]; then node_modules/.bin/grunt test; fi;
# Run functional/behat tests
- if [ "$TEST_SCOPE" = "javascript" ]; then vendor/bin/behat --suite=javascript; fi;
- if [ "$TEST_SCOPE" = "javascript" ] && [ "$SYMFONY__ENABLE_ADDITIONALS" != "true" ]; then vendor/bin/behat --suite=javascript_basic; fi;
- if [ "$TEST_SCOPE" = "javascript" ] && [ "$SYMFONY__ENABLE_ADDITIONALS" = "true" ]; then vendor/bin/behat --suite=javascript_additionals; fi;
- if [ "$TEST_SCOPE" = "javascript" ]; then vendor/bin/behat --suite=server_side; fi;
after_script:
- if [ "$TEST_SCOPE" = "code" ] && [ "${PHPUNIT_COVERAGE}" != "" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;
- if [ "$TEST_SCOPE" = "code" ] && [ "${PHPUNIT_COVERAGE}" != "" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;
after_failure:
- if [ "$TEST_SCOPE" = "javascript" ]; then cat phpd.log; fi;
- if [ "$TEST_SCOPE" = "javascript" ]; then cat selenium.log; fi;
cache:
directories:
- $HOME/.composer/cache