Skip to content

Nucivic northd new version with tests #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
language: php

php:
- 5.5

mysql:
database: leaflet_draw_widget_test
username: root
encoding: utf8

install:
- cd test
- composer install
- mysql -e 'create database leaflet_draw_widget_test;'
- sudo apt-get update > /dev/null
- sudo apt-get --quiet=2 install php5-cgi php5-curl php5-gd php5-mysql > /dev/null

# Install latest Drush 7.
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require --no-interaction drush/drush:dev-master
- composer global require --no-interaction youngj/httpserver:*
- drush dl registry_rebuild
# Disable sendmail
- echo sendmail_path=`which true` >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

before_script:
# Navigate out of TRAVIS_BUILD_DIR to prevent blown stack by recursive module lookup
- cd ../..
# Grab dkan
- git clone --branch 7.x-1.x https://github.com/NuCivic/dkan.git
# Prepare install
- mkdir drupal
- cd drupal
- cp ../dkan/drupal-org-core.make ./
- drush make --prepare-install drupal-org-core.make --yes
- cp -R ../dkan profiles/
- cd profiles/dkan
- drush -y make --no-core --contrib-destination=./ drupal-org.make --no-recursion
- cd ../..
# Create Nucivic Directory and Copy working copy to proper dir
- mkdir sites/all/modules/nucivic
- cp -r $TRAVIS_BUILD_DIR sites/all/modules/nucivic/leaflet_draw_widget
- drush -y make --no-core sites/all/modules/nucivic/leaflet_draw_widget/leaflet_widget.make --no-recursion
# Go back to TRAVIS_BUILD_DIR and move drupal build inside the test folder
- cd $TRAVIS_BUILD_DIR/test
- mv ../../drupal ./
# Install dkan
- cd drupal
- drush si dkan --sites-subdir=default --db-url=mysql://root:@127.0.0.1:3306/leaflet_draw_widget_test --account-name=admin --account-pass=admin --site-name="DKAN" install_configure_form.update_status_module='array(FALSE,FALSE)' --yes
# Enable module
- drush -y en leaflet_widget
- drush rr all
- drush ev 'node_access_rebuild();'
# Clear cache and run webserver
- drush cc all --yes
- drush --quiet --yes --root=$PWD runserver :8888 > /dev/null 2>&1 &
- sleep 4
# Setup display for selenium
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
# Download and run selenium
- cd ..
- wget http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar
- java -jar selenium-server-standalone-2.42.2.jar -quiet -p 4444 -log shut_up_selenium &
- sleep 5

script:
- bin/behat features/leaflet_draw_widget.feature

notifications:
slack:
rooms:
Loading