Browse Source

Update sources in .travis.yml (#54)

pull/756/head
Jonathan Green 8 years ago committed by dannylamb
parent
commit
4e1b43cdde
  1. 14
      .scripts/line_endings.sh
  2. 5
      .scripts/php56.ini
  3. 43
      .scripts/travis_setup.sh
  4. 5
      .travis.yml

14
.scripts/line_endings.sh

@ -1,14 +0,0 @@
#!/bin/bash
RETURN=0
FILES=`find -L $1 -name "*"`
echo "Testing for files with DOS line endings..."
for FILE in $FILES
do
file $FILE | grep CRLF
if [ $? == 0 ]
then
RETURN=1
fi
done
exit $RETURN

5
.scripts/php56.ini

@ -1,5 +0,0 @@
; there is an issue with php 5.6 that causes travis to fail
; some info about it here:
; https://bugs.php.net/bug.php?id=66763
; https://www.drupal.org/node/2456025
always_populate_raw_post_data = -1

43
.scripts/travis_setup.sh

@ -1,43 +0,0 @@
#!/bin/bash
echo "Setup database for Drupal"
mysql -u root -e 'create database drupal;'
mysql -u root -e "GRANT ALL PRIVILEGES ON drupal.* To 'drupal'@'127.0.0.1' IDENTIFIED BY 'drupal';"
if [ $TRAVIS_PHP_VERSION = "5.6" ]; then
phpenv config-add $SCRIPT_DIR/php56.ini
fi
echo "Install utilities needed for testing"
mkdir /opt/utils
cd /opt/utils
composer require squizlabs/php_codesniffer
composer require drupal/coder
composer require sebastian/phpcpd
sudo ln -s /opt/utils/vendor/bin/phpcs /usr/bin/phpcs
sudo ln -s /opt/utils/vendor/bin/phpcpd /usr/bin/phpcpd
phpenv rehash
phpcs --config-set installed_paths /opt/utils/vendor/drupal/coder/coder_sniffer
echo "Composer install drupal site"
cd /opt
git clone https://github.com/Islandora-CLAW/drupal-project.git drupal
cd drupal
composer install
echo "Setup Drush"
sudo ln -s /opt/drupal/vendor/bin/drush /usr/bin/drush
phpenv rehash
echo "Drush setup drupal site"
cd web
drush si --db-url=mysql://drupal:drupal@127.0.0.1/drupal --yes
drush runserver 127.0.0.1:8282 &
until curl -s 127.0.0.1:8282; do true; done > /dev/null
echo "Enable simpletest module"
drush --uri=127.0.0.1:8282 en -y simpletest
echo "Setup ActiveMQ"
cd /opt
wget "http://archive.apache.org/dist/activemq/5.14.3/apache-activemq-5.14.3-bin.tar.gz"
tar -xzf apache-activemq-5.14.3-bin.tar.gz
apache-activemq-5.14.3/bin/activemq start

5
.travis.yml

@ -13,11 +13,12 @@ branches:
- /^8.x/ - /^8.x/
before_install: before_install:
- export SCRIPT_DIR=$TRAVIS_BUILD_DIR/.scripts - export SCRIPT_DIR=$HOME/CLAW/.scripts
- export DRUPAL_DIR=/opt/drupal - export DRUPAL_DIR=/opt/drupal
install: install:
- $SCRIPT_DIR/travis_setup.sh - git clone https://github.com/Islandora-CLAW/CLAW.git $HOME/CLAW
- $SCRIPT_DIR/travis_setup_drupal.sh
- git -C "$TRAVIS_BUILD_DIR" checkout -b travis-testing - git -C "$TRAVIS_BUILD_DIR" checkout -b travis-testing
- cd $DRUPAL_DIR; composer config repositories.local path "$TRAVIS_BUILD_DIR" - cd $DRUPAL_DIR; composer config repositories.local path "$TRAVIS_BUILD_DIR"
- composer require "islandora/islandora:dev-travis-testing as dev-8.x-1.x" --prefer-source - composer require "islandora/islandora:dev-travis-testing as dev-8.x-1.x" --prefer-source

Loading…
Cancel
Save