-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
56 lines (46 loc) · 1.81 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
45
46
47
48
49
50
51
52
53
54
55
56
language: php
os: linux
dist: trusty
env:
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
cache:
directories:
- $HOME/.composer/cache/files
- tmp/pear/download/
- vendor/
- composer.lock
addons:
code_climate:
repo_token: $CODECLIMATE_REPO_TOKEN
services:
- mysql
- postgresql
before_install:
- mkdir -p build/logs
- if [[ "${TRAVIS_PHP_VERSION:0:1}" == "7" ]] || [[ "$TRAVIS_PHP_VERSION" == "hhvm" ]]; then phpenv config-rm xdebug.ini; fi
- phpenv rehash
- sh -c "psql -c 'DROP DATABASE IF EXISTS tests;' -U postgres"
- sh -c "psql -c 'DROP DATABASE IF EXISTS tests2;' -U postgres"
- sh -c "psql -c 'CREATE DATABASE tests;' -U postgres"
- sh -c "psql -c 'CREATE DATABASE tests2;' -U postgres"
install:
- travis_retry composer selfupdate
- travis_retry composer install --no-interaction --prefer-source --ansi -o -v
before_script:
- psql tests < tests/psql.sql
- mysql --default-character-set=utf8mb4 < tests/mysql.sql
- sqlite3 tests.db ".read tests/sqlite.sql"
script:
- if [[ "${TRAVIS_PHP_VERSION:0:1}" == "7" ]]; then PGDBUSER=postgres PGDBHOST=localhost PGDBNAME=tests DBUSER=tests DBPASS=tests DBHOST=localhost DBNAME=tests phpdbg -qrr vendor/bin/phpunit -c phpunit.xml.dist --testsuite "all tests"; fi;
- if [[ "${TRAVIS_PHP_VERSION:0:1}" != "7" ]]; then PGDBUSER=postgres PGDBHOST=localhost PGDBNAME=tests DBUSER=tests DBPASS=tests DBHOST=localhost DBNAME=tests vendor/bin/phpunit -c phpunit.xml.dist --testsuite "all tests"; fi
after_script:
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then travis_retry vendor/bin/test-reporter --coverage-report=coverage.xml; fi
- travis_retry bash <(curl -s https://codecov.io/bash);
- travis_retry php $(ls vendor/bin/*coveralls|head -n 1) -v -x coverage.xml
- travis_retry php vendor/bin/codacycoverage clover coverage.xml;