forked from DamienHarper/auditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (33 loc) · 1.17 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
language: php
os: linux
branches:
only:
- master
cache:
directories:
- $HOME/.composer/cache
php:
- 7.2
- 7.3
- 7.4
env:
- DB=sqlite
- DB=mysql
- DB=pgsql
before_install:
- if [[ $DB == 'mysql' ]]; then sudo systemctl start mysql && mysql -u root -e 'select version()'; fi
- if [[ $DB == 'pgsql' ]]; then sudo systemctl start postgresql && psql -U postgres -c 'SHOW SERVER_VERSION'; fi
- composer self-update
install:
- COMPOSER_MEMORY_LIMIT=-1 composer update $COMPOSER_FLAGS --prefer-dist
before_script:
- phpenv config-rm xdebug.ini
- pecl install pcov
script:
- if [ $(phpenv version-name) = "7.2" ]; then ./vendor/bin/phpunit -c phpunit.$DB.xml --disable-coverage; fi
- if [ $(phpenv version-name) = "7.3" ]; then ./vendor/bin/phpunit -c phpunit.$DB.xml --disable-coverage; fi
- if [ $(phpenv version-name) = "7.4" ]; then php -d pcov.enabled=1 ./vendor/bin/phpunit -c phpunit.$DB.xml --coverage-clover clover.xml; fi
after_script:
- if [ $(phpenv version-name) = "7.4" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then bash <(curl -s https://codecov.io/bash); fi
jobs:
fast_finish: true