[TASK] Optimize Travis build matrix 03/35003/5
authorHelmut Hummel <helmut.hummel@typo3.org>
Wed, 3 Dec 2014 17:33:10 +0000 (18:33 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 3 Dec 2014 19:47:41 +0000 (20:47 +0100)
* make the xlfcheck script executable
* add conditions around every test suit
* add a specific build matrix to exclude not needed multiple xlf checks

Releases: master
Change-Id: I245513542f205df8474dfc25ab7c1253143bbf91
Reviewed-on: http://review.typo3.org/35003
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
.travis.yml
typo3/sysext/core/Build/Scripts/xlfcheck.sh [changed mode: 0644->0755]

index 0e5b9aa..1e496c4 100644 (file)
@@ -1,16 +1,15 @@
 language: php
 
-php:
-  - 5.5
-  - 5.6
-  - hhvm-nightly
-
 matrix:
   allow_failures:
     - php: hhvm-nightly
-
-env:
-  - DB=mysql
+  include:
+    - php: 5.5
+      env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes XLF_CHECK=yes
+    - php: 5.6
+      env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes
+    - php: hhvm-nightly
+      env: UNIT_TESTS=yes
 
 services:
   - memcached
@@ -32,18 +31,19 @@ notifications:
 before_script:
   - if [ -e ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
   - if [ -e ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ]; then echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
-  - chmod a+x typo3/sysext/core/Build/Scripts/*
   - sudo apt-get install parallel
   - composer self-update
   - composer install
 
 script:
   - >
-    echo;
-    echo "Running unit tests";
-    ./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml
+    if [[ "$UNIT_TESTS" == "yes" ]]; then
+      echo;
+      echo "Running unit tests";
+      ./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml
+    fi
   - >
-    if [[ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]]; then
+    if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
         echo;
         export typo3DatabaseName="typo3";
         export typo3DatabaseHost="localhost";
@@ -52,7 +52,7 @@ script:
         find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml {}'
     fi
   - >
-    if [[ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]]; then
+    if [[ "$PHP_LINT" == "yes" ]]; then
         echo;
         echo "Running php lint";
         /bin/bash -c "
@@ -63,7 +63,7 @@ script:
         "
     fi
   - >
-    if [[ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]]; then
+    if [[ "$XLF_CHECK" == "yes" ]]; then
         echo;
         echo "Running XLF checker";
         ./typo3/sysext/core/Build/Scripts/xlfcheck.sh
old mode 100644 (file)
new mode 100755 (executable)