From 9c313e3c2d89c8cc483754c8b31bfdd666d61b7a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 30 Apr 2019 16:00:26 +0200 Subject: [PATCH] added Drupal in the CI process --- .travis.yml | 22 +++++++++++----------- drupal_test.sh | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 11 deletions(-) create mode 100755 drupal_test.sh diff --git a/.travis.yml b/.travis.yml index f917348ca..95d4368e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,20 +7,10 @@ cache: - vendor - $HOME/.composer/cache/files -php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - env: - TWIG_EXT=no before_install: - # turn off XDebug - phpenv config-rm xdebug.ini || return 0 install: @@ -32,12 +22,22 @@ before_script: script: ./vendor/bin/simple-phpunit -matrix: +jobs: fast_finish: true include: + - php: 5.4 - php: 5.4 env: TWIG_EXT=yes + - php: 5.5 - php: 5.5 env: TWIG_EXT=yes + - php: 5.6 - php: 5.6 env: TWIG_EXT=yes + - php: 7.0 + - php: 7.1 + - php: 7.2 + - php: 7.3 + - stage: integration tests + php: 7.3 + script: ./drupal_test.sh diff --git a/drupal_test.sh b/drupal_test.sh new file mode 100755 index 000000000..c4587ec74 --- /dev/null +++ b/drupal_test.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +set -x +set -e + +REPO=`pwd` +cd /tmp +rm -rf drupal-twig-test +composer create-project --no-interaction drupal-composer/drupal-project:8.x-dev drupal-twig-test +cd drupal-twig-test +(cd vendor/twig && rm -rf twig && ln -sf $REPO twig) +echo '$config["system.logging"]["error_level"] = "verbose";' >> web/sites/default/settings.php +php ./web/core/scripts/drupal install --no-interaction demo_umami 2>/dev/null > output +perl -p -i -e 's/^([A-Za-z]+)\: (.+)$/export DRUPAL_\1=\2/' output +source output + +wget https://get.symfony.com/cli/installer -O - | bash +export PATH="$HOME/.symfony/bin:$PATH" +symfony server:start -d --no-tls +ENDPOINT=`symfony server:status -no-ansi | sed -E 's/^.+ http/http/'` + +curl -OLsS https://get.blackfire.io/blackfire-player.phar +chmod +x blackfire-player.phar +cat > drupal-tests.bkf <