forked from iherwig/wcmf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (36 loc) · 1.4 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
35
36
37
38
39
40
41
42
43
44
sudo: false
addons:
apt:
packages:
- oracle-java8-installer
services:
- mysql
language: php
env:
global:
- JAVA_HOME=/usr/lib/jvm/java-8-oracle
- TEST_DIR=$TRAVIS_BUILD_DIR/src/wcmf/test WCMF_BASE_DIR=$TRAVIS_BUILD_DIR/src
- VENDOR_DIR=$TRAVIS_BUILD_DIR/vendor
- PHPUNIT_DIR=$VENDOR_DIR/phpunit/phpunit
- ENABLE_COVERAGE=0
- secure: CzS6tWrXhO+YYC3eN2yeB4+BgmA3G62drxgj+XIzu0LdZTjbaafvDQCkNUQ6SUaMguS/WTDr9XcqA5MZy4J5QqucWkidcvGnaH4iBJLdYLQ5aIxZqK75zzf2K9vfgh/Zy2JQh07OKBz4ViCZumY8RdW6jxv3lq68Az5yQ31iG/M=
matrix:
include:
- php: 5.6
env: ENABLE_COVERAGE=1
- php: 7.0
- php: 7.1
- php: 7.2
allow_failures:
before_script:
- if [[ "$ENABLE_COVERAGE" == "0" && $TRAVIS_PHP_VERSION != 7.1 ]]; then phpenv config-rm xdebug.ini; fi
- mysql -e 'CREATE DATABASE wcmf_testapp;'
- composer self-update
- composer install
- mkdir $WCMF_BASE_DIR/app && mkdir $WCMF_BASE_DIR/install
- cd $TEST_DIR/model && ant
script:
- if [[ "$ENABLE_COVERAGE" == "1" ]]; then cd $TEST_DIR && $PHPUNIT_DIR/phpunit -v --coverage-clover $TRAVIS_BUILD_DIR/logs/clover.xml --bootstrap bootstrap.php -c configuration.xml; fi
- if [[ "$ENABLE_COVERAGE" == "0" ]]; then cd $TEST_DIR && $PHPUNIT_DIR/phpunit -v --bootstrap bootstrap.php -c configuration.xml; fi
after_script:
- if [[ "$ENABLE_COVERAGE" == "1" ]]; then cd $TRAVIS_BUILD_DIR && php $VENDOR_DIR/bin/codacycoverage clover $TRAVIS_BUILD_DIR/logs/clover.xml; fi