Skip to content

Commit e04035d

Browse files
committed
Merge pull request #342 from josegonzalez/josegonzalez-patch-1
Fix runs on docker-based platforms
2 parents 15f1df7 + c03ce84 commit e04035d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sudo: false
1111
env:
1212
matrix:
1313
- DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
14-
- DB=pgsql db_dsn='postgres://[email protected]/cakephp_test'
14+
- DB=pgsql db_dsn='postgres://[email protected]/cakephp_test'
1515
- DB=sqlite db_dsn='sqlite:///:memory:'
1616
global:
1717
- DEFAULT=1
@@ -39,7 +39,7 @@ before_script:
3939
- composer self-update
4040
- composer install --prefer-source --no-interaction --dev
4141

42-
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
42+
- sh -c "if [ '$DB' = 'mysql' ]; then if [ '$DOCKER' = '1' ]; then apt-get -qq install -qq -y mysql-server && service mysql start; fi; mysql -e 'CREATE DATABASE cakephp_test;'; fi"
4343

4444
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
4545

@@ -48,9 +48,7 @@ before_script:
4848
- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
4949
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"
5050

51-
- phpenv rehash
52-
- set +H
53-
- cp phpunit.xml.dist phpunit.xml
51+
- command -v phpenv > /dev/null && phpenv rehash || true
5452

5553
script:
5654
- sh -c "if [ '$COVERALLS' = '1' ]; then phpunit --stderr --coverage-clover build/logs/clover.xml; fi"

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
},
1919
"require-dev": {
2020
"phpunit/phpunit": "4.1.*",
21-
"league/flysystem-vfs": "*"
21+
"league/flysystem-vfs": "*",
22+
"cakephp/cakephp-codesniffer": "dev-master",
23+
"satooshi/php-coveralls": "dev-master"
2224
},
2325
"autoload": {
2426
"psr-4": {

0 commit comments

Comments
 (0)