Browse code

enhance travis setup

- require php 7 pass (except with extension)
- use container-based infrastructure
- composer self-update to get rid of the outdated warning
- install --prefer-source because travis auth fails against dist

Tobias Schultze authored on 21/08/2015 14:08:16
Showing 1 changed files
... ...
@@ -1,5 +1,7 @@
1 1
 language: php
2 2
 
3
+sudo: false
4
+
3 5
 php:
4 6
     - 5.2
5 7
     - 5.3
... ...
@@ -9,25 +11,26 @@ php:
9 11
     - hhvm
10 12
     - nightly
11 13
 
12
-allow_failures:
13
-    - php: nightly
14
-
15 14
 env:
16 15
     - TWIG_EXT=no
17 16
     - TWIG_EXT=yes
18 17
 
19
-before_script:
20
-    - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && sudo make install"; fi
21
-    - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
22
-    - if [ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]; then sed -i.bak "s|vendor/autoload.php|test/bootstrap.php|" phpunit.xml.dist; fi
18
+before_install:
19
+    - if [ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]; then composer self-update; fi
23 20
 
24 21
 install:
25 22
     # Composer is not available on PHP 5.2
26
-    - if [ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]; then travis_retry composer install; fi
23
+    - if [ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]; then travis_retry composer install --prefer-source; fi
24
+
25
+before_script:
26
+    - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && make install"; fi
27
+    - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
28
+    - if [ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]; then sed -i.bak "s|vendor/autoload.php|test/bootstrap.php|" phpunit.xml.dist; fi
27 29
 
28 30
 matrix:
29 31
     exclude:
30 32
         - php: hhvm
31 33
           env: TWIG_EXT=yes
34
+    allow_failures:
32 35
         - php: nightly
33 36
           env: TWIG_EXT=yes