-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
49 lines (39 loc) · 1.57 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
language: php
php:
- 8.0.2
- nightly
env:
- db=postgres
- db=mysql
- db=sqlite3
matrix:
fast_finish: true
allow_failures:
- php: nightly
services:
- mysql
addons:
postgresql: "9.5"
cache:
directories:
- vendor
- $HOME/.composer/cache
install:
- mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d
- phpenv config-add test/phpconfig.ini
- travis_retry composer self-update
- travis_retry composer install
before_script:
- psql -c "CREATE USER ouzo_user WITH PASSWORD 'password';" -U postgres
- psql -c 'CREATE database ouzo_test;' -U postgres
- psql -c "GRANT ALL PRIVILEGES ON DATABASE "ouzo_test" to ouzo_user;" -U postgres
- psql -c 'ALTER DATABASE ouzo_test OWNER TO ouzo_user' -U postgres
- psql -v ON_ERROR_STOP=1 -e -U ouzo_user -f test/test-db/recreate_schema.sql ouzo_test
- mysql -u travis -e 'create database ouzo_test' && cat test/test-db/recreate_schema_mysql.sql | mysql -u travis ouzo_test
- cat test/test-db/recreate_schema_sqlite3.sql | sqlite3 ouzo_test
script:
- if [[ "$db" == "sqlite3" ]]; then vendor/bin/phpunit -d zend.enable_gc=0 --configuration phpunit.xml --exclude-group non-sqlite3,postgres test; fi
- if [[ "$db" == "postgres" ]]; then vendor/bin/phpunit --debug --verbose -d zend.enable_gc=0 --configuration phpunit.xml --exclude-group sqlite3 test; fi
- if [[ "$db" == "mysql" ]]; then vendor/bin/phpunit -d zend.enable_gc=0 --configuration phpunit.xml --exclude-group sqlite3,postgres test; fi
after_script:
- php vendor/bin/coveralls -v