From 3b134dffd310af44fb86b5a5c886e0179bcaecea Mon Sep 17 00:00:00 2001
From: fago <fago@wolfgangziegler.net>
Date: Sun, 29 Nov 2015 17:20:55 +0100
Subject: [PATCH] Added travis support based on the Rules travis config.

---
 .travis.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..bc5be54
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,52 @@
+language: php
+sudo: false
+
+php:
+  - 5.5
+  - 5.6
+  - 7
+  - hhvm
+
+matrix:
+  allow_failures:
+    # PHP 7 testing is disabled for now since Drupal installation throws
+    # errors. See https://www.drupal.org/node/2454439
+    - php: 7
+    # We cannot use hhvm-nightly since that does not work in Travis CI's old
+    # Ubuntu 12.04.
+    - php: hhvm
+  # Don't wait for the allowed failures to build.
+  fast_finish: true
+
+mysql:
+  database: entity
+  username: root
+  encoding: utf8
+
+before_script:
+  # Remove Xdebug as we don't need it and it causes
+  # PHP Fatal error:  Maximum function nesting level of '256' reached.
+  # We also don't care if that file exists or not on PHP 7.
+  - phpenv config-rm xdebug.ini || true
+
+  # Remember the current entity test directory for later use in the Drupal
+  # installation.
+  - TESTDIR=$(pwd)
+  # Navigate out of module directory to prevent blown stack by recursive module
+  # lookup.
+  - cd ..
+
+  # Create database.
+  - mysql -e 'create database entity'
+  # Export database variable for kernel tests.
+  - export SIMPLETEST_DB=mysql://root:@127.0.0.1/entity
+  # Download Drupal 8 core.
+  - travis_retry git clone --branch 8.0.x --depth 1 http://git.drupal.org/project/drupal.git
+  - cd drupal
+
+  # Reference entity in build site.
+  - ln -s $TESTDIR modules/entity
+
+script:
+  # Run the PHPUnit tests which also include the kernel tests.
+  - ./vendor/phpunit/phpunit/phpunit -c ./core/phpunit.xml.dist ./modules/entity
-- 
GitLab