Skip to content

Commit

Permalink
fix: install mysql via service addon for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez authored and rchavik committed Jan 10, 2017
1 parent bcdbc72 commit f2b9ac0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ php:

dist: trusty

services:
- mysql

env:
matrix:
- DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
Expand All @@ -31,7 +34,6 @@ before_install:

- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;

- if [ $DB = 'mysql' ]; then sudo apt-get -y install mysql-server; fi
- if [ $DB = 'mysql' ]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi

- if [ $DB = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
Expand Down

0 comments on commit f2b9ac0

Please sign in to comment.