.travis.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. language: php
  2. services:
  3. - docker
  4. - postgres
  5. sudo: required
  6. php:
  7. - 5.6
  8. - 7.0
  9. - 7.1
  10. env:
  11. - BASE_URL="http://localhost:8080"
  12. install:
  13. - composer global require drush/drush:8
  14. before_script:
  15. - docker pull statonlab/tripal2
  16. - psql -c "create database test_db encoding 'utf-8';" -U postgres
  17. - psql -c "alter role postgres with password 'dbpass';" -U postgres
  18. - cd ..
  19. # Set additional environment variables
  20. - export PATH="$HOME/.config/composer/vendor/bin:$PATH"
  21. - export DRUPAL_ROOT="$(pwd)/drupal"
  22. # Download and install Drupal
  23. - drush dl drupal-7 -y
  24. - mv drupal-7* drupal
  25. - cd drupal
  26. - drush si -y --db-url='pgsql://postgres:dbpass@localhost:5432/test_db'
  27. --account-name='admin'
  28. --account-pass='admin_pass'
  29. --site-mail='admin@example.com'
  30. --site-name='Tripal 3'
  31. # Download Dependencies
  32. - drush dl -y field_group, field_group_table, field_formatter_class, field_formatter_settings, ctools, date, devel,
  33. ds, link, entity, libraries, redirect, token, tripal-7.x-3.0-rc2, uuid, jquery_update, views, webform
  34. # Enable dependencies
  35. - drush en -y field_group, field_group_table, field_formatter_class, field_formatter_settings, ctools, date, devel,
  36. ds, link, entity, libraries, redirect, token, tripal-7.x-3.0-rc2, uuid, jquery_update, views, webform
  37. # Run the drush server
  38. - drush runserver localhost:8080 &
  39. script:
  40. # Link our repo to the modules directory
  41. - ln -s ../tripal sites/all/modules/tripal
  42. # Apply patches
  43. - wget --no-check-certificate https://drupal.org/files/drupal.pgsql-bytea.27.patch
  44. - patch -p1 < drupal.pgsql-bytea.27.patch
  45. - cd sites/all/modules/views
  46. - patch -p1 < ../tripal/tripal_chado_views/views-sql-compliant-three-tier-naming-1971160-30.patch
  47. - cd ../tripal
  48. # Install Tripal
  49. - drush en -y tripal tripal_chado tripal_chado_views tripal_ds tripal_ws
  50. - drush eval "module_load_include('inc', 'tripal_chado', 'includes/tripal_chado.install'); tripal_chado_load_drush_submit('Install Chado v1.3');"
  51. - drush trp-run-jobs --username=admin
  52. # Prepare Chado
  53. - drush eval "module_load_include('inc', 'tripal_chado', 'includes/setup/tripal_chado.setup'); tripal_chado_prepare_drush_submit();"
  54. - drush trp-run-jobs --username=admin
  55. # Prepare Drupal
  56. - drush eval "module_load_include('inc', 'tripal_chado', 'includes/setup/tripal_chado.setup'); tripal_chado_prepare_drush_submit();"
  57. - drush trp-run-jobs --username=admin
  58. # Run PHPUnit tests
  59. - composer install
  60. - ./vendor/bin/phpunit
  61. # Test Tripal v2 to v3 upgrade steps
  62. # - docker run -it -d --rm --name tripal2 -v "$(pwd)":/modules/tripal statonlab/tripal2
  63. # - sleep 15
  64. # - docker exec -it tripal2 drush en -y tripal_core
  65. # - docker exec -it tripal2 drush pm-disable tripal_core -y
  66. # - git checkout $BRANCH
  67. # - docker exec -it tripal2 drush en -y tripal