language: php

# Add php version so composer doesn't complain
php:
  - 7.1

services:
  - docker

env:
  - DRUPAL_ROOT=/var/www/html

before_script:
  - docker pull statonlab/tripal3
  - wget ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.30/ncbi-blast-2.2.30+-x64-linux.tar.gz
  - tar xzf ncbi-blast-2.2.30+-x64-linux.tar.gz
script:
  - docker run -it -d --rm --name tripal -v "$(pwd)":/modules/tripal_blast statonlab/tripal3
  - sleep 30 # We pause here so postgres and apache complete booting up
 #install blast
  - docker exec -it tripal bash -c "cp /modules/tripal_blast/ncbi-blast-2.2.30+/bin/* /usr/local/bin"
  - docker exec -it tripal drush pm-enable -y blast_ui
  - docker exec -it tripal bash -c "cd /modules/tripal_blast && composer install && DRUPAL_ROOT=/var/www/html ./vendor/bin/phpunit"