-
Notifications
You must be signed in to change notification settings - Fork 56
/
.travis.yml
100 lines (93 loc) · 2.61 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
language: php
sudo: false
matrix:
fast_finish: true
include:
- php: 7.3
dist: bionic
sudo: true
services:
- mysql
env:
- DEPENDENCIES=""
- DRIVER="pdo_mysql"
- DB=mysql_5.7
- php: 7.4
dist: bionic
sudo: true
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- DRIVER="pdo_mysql"
- DB=mariadb_10.2
addons:
mariadb: '10.2'
- php: 8.0
dist: bionic
env:
- DEPENDENCIES=""
- DRIVER="pdo_pgsql"
- DB=postgres_9.6
- DB_ATTR_ERRMODE=2 # \PDO::ERRMODE_EXCEPTION
addons:
postgresql: '9.6'
- php: 8.1
dist: bionic
sudo: true
env:
- DEPENDENCIES=""
- DRIVER="pdo_mysql"
- DB=mariadb_10.3
addons:
mariadb: '10.3'
- php: 8.1
dist: bionic
sudo: true
services:
- mysql
env:
- DEPENDENCIES=""
- DRIVER="pdo_mysql"
- DB=mysql_5.7
- php: 8.1
dist: bionic
env:
- DEPENDENCIES=""
- DRIVER="pdo_pgsql"
- DB=postgres_9.5
addons:
postgresql: '9.5'
- php: 8.1
dist: bionic
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- DRIVER="pdo_pgsql"
- DB=postgres_9.6
addons:
postgresql: '9.6'
cache:
directories:
- $HOME/.composer/cache
- $HOME/.php-cs-fixer
- $HOME/.local
before_script:
- mkdir -p "$HOME/.php-cs-fixer"
- phpenv config-rm xdebug.ini
- VENDOR=$(echo $DB | cut -d'_' -f 1)
- if [[ $DRIVER == 'pdo_mysql' ]]; then mysql -e 'create database event_store_tests;'; fi
- if [[ $DRIVER == 'pdo_pgsql' ]]; then psql -c 'create database event_store_tests;' -U postgres; fi
- composer self-update
- composer update $DEPENDENCIES
- rm -rf $HOME/.php-cs-fixer/.php_cs.cache
script:
- cp phpunit.$VENDOR.xml phpunit.xml
- if [[ $TEST_COVERAGE == 'true' ]]; then XDEBUG_MODE=coverage php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi
after_success:
- if [[ $TEST_COVERAGE == 'true' ]]; then php vendor/bin/coveralls -v; fi
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/61c75218816eebde4486
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always