forked from NAL-i5K/tripal_eutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (28 loc) · 1.53 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
language: php
# Add php version so composer doesn't complain
php:
- 7.1
services:
- docker
env:
- DRUPAL_ROOT=/var/www/html IS_TRAVIS=TRUE CC_TEST_REPORTER_ID=d4d6bcc22c56ae459a80bc9428eb44040b2e7225b45c79ac445343a73d582abf
before_script:
- docker pull statonlab/tripal3
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build --debug
- GIT_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
- GIT_COMMIT_SHA=$TRAVIS_PULL_REQUEST_SHA
script:
- docker run -it -d --rm --name tripal -p 8080:80 -v "$(pwd)":/modules/tripal_eutils statonlab/tripal3
- sleep 30 # We pause here while postgres and apache boot
- docker exec -it tripal bash -c "cd /modules/ && git clone https://github.com/statonlab/tripal_manage_analyses.git && drush pm-enable -y tripal_manage_analyses"
- docker exec -it tripal drush pm-enable -y tripal_eutils
- docker exec -it tripal yum install -y php-pecl-xdebug.x86_64
# Repopulate the cache before running tests
#skip because it breaks the build.
#- curl -s localhost:8080 > /dev/null
- docker exec -it tripal bash -c "cd /modules/tripal_eutils && composer install && DRUPAL_ROOT=/var/www/html IS_TRAVIS=TRUE ./vendor/bin/phpunit --coverage-clover ./clover.xml"
after_script:
#- ./cc-test-reporter format-coverage --prefix /modules/tripal_eutils
- ./cc-test-reporter after-build clover.xml --debug -t clover -p /var/www/html/sites/all/modules/custom/tripal_eutils --exit-code $TRAVIS_TEST_RESULT