-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (27 loc) · 1.32 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
language: php
# Add php version so composer doesn't complain
php:
- 7.1
services:
- docker
env:
- DRUPAL_ROOT=/var/www/html
- CC_TEST_REPORTER_ID=d8a38a886af5c25501a12ae0a9acb17c051ca288be1e948a8ab014d5264ad9ab
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
- composer global require drupal/coder
- composer global require drupal/coder:^8.3.1
- composer global require dealerdirect/phpcodesniffer-composer-installer
script:
- docker run -it -d --rm --name tripal -v "$(pwd)":/modules/tripal_qtl statonlab/tripal3
- sleep 45 # We pause here so postgres and apache complete booting up
- docker exec -it tripal drush pm-enable -y tripal_qtl
- docker exec -it tripal yum install -y php-pecl-xdebug.x86_64
- docker exec -it tripal bash -c "cd /modules/tripal_qtl && composer install && DRUPAL_ROOT=/var/www/html IS_TRAVIS=TRUE ./vendor/bin/phpunit --coverage-clover ./clover.xml"
after_script:
- ./cc-test-reporter after-build clover.xml --debug -t clover -p /var/www/html/sites/all/modules/custom/tripal_qtl --exit-code $TRAVIS_TEST_RESULT