Skip to content

Commit 202bce1

Browse files
committed
Updated travis yaml
1 parent 88f8273 commit 202bce1

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

.travis.yml

+13-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
language: php
22

3+
services:
4+
- postgresql
5+
- mysql
6+
37
php:
48
- 7.2
59
- 7.3
@@ -8,32 +12,23 @@ php:
812
sudo: false
913

1014
env:
11-
- DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
12-
- DB=pgsql db_dsn='postgres://[email protected]/cakephp_test'
13-
- DB=sqlite
15+
matrix:
16+
- DB=mysql DB_DSN='mysql://[email protected]/cakephp_test'
17+
- DB=pgsql DB_DSN='postgres://[email protected]/cakephp_test'
18+
- DB=sqlite DB_DSN='sqlite:///:memory:'
1419

1520
matrix:
1621
fast_finish: true
17-
include:
18-
- php: 7.2
19-
env: COVERAGE=1
22+
23+
before_install:
24+
- if [[ $DB == 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
25+
- if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
2026

2127
install:
22-
- composer self-update
2328
- composer install --prefer-dist --no-interaction
2429

25-
before_script:
26-
- if [[ $DB == 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
27-
- if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
28-
- phpenv rehash
29-
- set +H
30-
3130
script:
32-
- if [[ $COVERAGE == 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
33-
- if [[ $COVERAGE != 1 ]]; then vendor/bin/phpunit; fi
34-
35-
after_success:
36-
- if [[ $COVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
31+
- vendor/bin/phpunit
3732

3833
notifications:
3934
email: false

0 commit comments

Comments
 (0)