@@ -5,51 +5,76 @@ services:
5
5
- redis-server
6
6
- memcached
7
7
8
- php :
9
- - 7.1
10
- - 7.0
11
- - 5.6
8
+ cache :
9
+ directories :
10
+ - $HOME/.composer/cache/files
11
+ - $HOME/symfony-bridge/.phpunit
12
12
13
13
env :
14
- global :
15
- - COMPOSER_COMMAND="composer install --prefer-dist"
16
- - TEST_COMMAND="php vendor/bin/phpunit"
17
- - COVERAGE=false
18
- matrix :
19
- - SYMFONY_VERSION=2.7.*
20
- - SYMFONY_VERSION=2.8.*
21
- - SYMFONY_VERSION=3.3.*
22
- - SYMFONY_VERSION=4.0.*
14
+ global :
15
+ - TEST_COMMAND="composer test"
16
+ - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
17
+ - SYMFONY_DEPRECATIONS_HELPER="weak"
23
18
24
19
branches :
25
- except :
26
- - /^analysis-.*$/
27
- - /^patch-.*$/
20
+ except :
21
+ - /^analysis-.*$/
28
22
29
23
matrix :
30
- fast_finish : true
31
- include :
32
- - php : 5.6
33
- env : COMPOSER_COMMAND="composer update --prefer-lowest --prefer-stable" COVERAGE=true TEST_COMMAND=" php -dzend_extension=xdebug.so vendor/bin/phpunit --coverage-clover=coverage.xml" SYMFONY_VERSION=2.7.*
34
- - php : hhvm
35
- env : SYMFONY_VERSION=3.3.*
36
- dist : trusty
24
+ fast_finish : true
25
+ include :
26
+ # Minimum supported Symfony version and latest PHP version
27
+ - php : 7.2
28
+ env : COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
29
+ - php : 5.6
30
+ env : COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
37
31
38
- cache :
39
- directories :
40
- - $HOME/.composer/cache
32
+ # Test the latest stable release
33
+ - php : 5.6
34
+ - php : 7.0
35
+ env : SYMFONY_PHPUNIT_VERSION="6.3"
36
+ - php : 7.1
37
+ env : SYMFONY_PHPUNIT_VERSION="6.3"
38
+ - php : 7.2
39
+ env : COVERAGE=true TEST_COMMAND="composer test-ci"
40
+
41
+ # Test LTS versions
42
+ - php : 7.2
43
+ env : DEPENDENCIES="dunglas/symfony-lock:^2"
44
+ - php : 7.2
45
+ env : DEPENDENCIES="dunglas/symfony-lock:^3"
46
+ - php : 7.2
47
+ env : DEPENDENCIES="dunglas/symfony-lock:^4"
48
+
49
+ # Latest commit to master
50
+ - php : 7.2
51
+ env : STABILITY="dev"
52
+
53
+ allow_failures :
54
+ # dev stability is allowed to fail.
55
+ - env : STABILITY="dev"
41
56
42
57
before_install :
43
- - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-add .travis/phpconfig. ini; fi;
44
- - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]] ; then phpenv config-rm xdebug.ini ; fi;
45
- - pip install --user codecov
46
- - composer require symfony/symfony:${SYMFONY_VERSION} --no-update
58
+ - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug. ini || true ; fi
59
+ - if ! [ -z "$STABILITY" ] ; then composer config minimum-stability ${STABILITY} ; fi;
60
+ - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
61
+ - pip install --user codecov
47
62
48
63
install :
49
- - travis_retry ${COMPOSER_COMMAND} --no-interaction
64
+ # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
65
+ - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
66
+ - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
67
+ - vendor/bin/simple-phpunit install
50
68
51
69
script :
52
- - $TEST_COMMAND
70
+ - composer validate --strict --no-check-lock
71
+ - $TEST_COMMAND
53
72
54
73
after_success :
55
- - if [[ "$COVERAGE" = true ]]; then codecov; fi
74
+ - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
75
+ - if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
76
+ - if [[ "$COVERAGE" = true ]]; then codecov; fi
77
+
78
+ after_script :
79
+ - wget http://tnyholm.se/reporter.phar
80
+ - php reporter.phar build:upload
0 commit comments