Browse Source

Configuring travis to run hhvm

Jose Lorenzo Rodriguez 12 years ago
parent
commit
368fe755bf
2 changed files with 17 additions and 1 deletions
  1. 5 1
      .travis.yml
  2. 12 0
      phpunit.xml.dist

+ 5 - 1
.travis.yml

@@ -3,6 +3,7 @@ language: php
 php:
   - 5.4
   - 5.5
+  - hhvm
 
 env:
   - DB=mysql db_class='Cake\Database\Driver\Mysql' db_dsn='mysql:host=0.0.0.0;dbname=cakephp_test' db_database='cakephp_test' db_login='travis' db_password=''
@@ -13,10 +14,13 @@ services:
   - memcached
 
 matrix:
+  allow_failures:
+    - php: hhvm
   include:
     - php: 5.4
       env:
         - PHPCS=1
+        - HHVM=1
 
 before_script:
   - sh -c "if [ '$PHPCS' != '1' ]; then sudo locale-gen de_DE; fi"
@@ -34,7 +38,7 @@ before_script:
   - set +H
 
 script:
-  - sh -c "if [ '$PHPCS' != '1' ]; then phpunit --stderr; else phpcs -p --extensions=php --standard=CakePHP ./src ./tests; fi"
+    - sh -c "if [ '$PHPCS' != '1' ] && [ '$HHVM' != '1' ]; then phpunit --stderr; elif [ '$PHPCS' != '1' ] && [ '$HHVM' == 1 ]; then phpunit --testsuite HHVM; else phpcs -p --extensions=php --standard=CakePHP ./src ./tests; fi"
 
 notifications:
   email: false

+ 12 - 0
phpunit.xml.dist

@@ -23,6 +23,18 @@
 		<testsuite name="Database Test Suite">
 			<file>./tests/TestCase/DatabaseSuite.php</file>
 		</testsuite>
+		<testsuite name="HHVM">
+			<file>./tests/TestCase/DatabaseSuite.php</file>
+			<directory>./tests/TestCase/Collection</directory>
+			<directory>./tests/TestCase/Configure</directory>
+			<directory>./tests/TestCase/Controller</directory>
+			<directory>./tests/TestCase/Event</directory>
+			<directory>./tests/TestCase/I18n</directory>
+			<directory>./tests/TestCase/Log</directory>
+			<directory>./tests/TestCase/Routing</directory>
+			<directory>./tests/TestCase/TestSuite</directory>
+			<directory>./tests/TestCase/Validation</directory>
+		</testsuite>
 	</testsuites>
 	<listeners>
 		<listener class="\Cake\TestSuite\Fixture\FixtureInjector" file="./src/TestSuite/Fixture/FixtureInjector.php">