Skip to content

Commit

Permalink
Try to fix travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmackay committed Mar 31, 2017
1 parent 66315c1 commit 01569aa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .env.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DB_TYPE=MySQLi
DB_HOST=127.0.0.1
DB_NAME=ushahidi
DB_PASS=
DB_USER=travis
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,35 @@ sudo: false
# secure: NxhzhKGYnZYZiWVZM4w1PlZpTy9bbmNlvbqjL+9d4PvK4hFzPwQU12CchhBPeXNGLWBHg/ti6Scn/t5XIS3YJrkk4ydWmJBht5UId8uFZ1A7GCUnNNPTt2RG55lbJJdZSj01rOGZjEQbE5RyckEjgRzhZjdZ+HsjoPaRzWIBrvE=
language: php
php:
- '5.5'
- '5.6'
- '7.0'
env:
- coverage="--coverage"
- coverage=""
matrix:
exclude:
- php: '5.5'
- php: '7.0'
env: coverage="--coverage"
allow_failures:
- env: coverage="--coverage"
- php: '7.0'
fast_finish: true
cache:
directories:
- "$HOME/.composer/cache"
services:
- mysql
before_install:
- mysql -e 'CREATE DATABASE ushahidi;'
- cp .env.travis .env
install:
- composer install --no-interaction
before_script:
- "./bin/tests install"
- composer pre-test
- mysql -e 'SET @@GLOBAL.wait_timeout=1800'
script:
- "./bin/tests run --no-install $coverage"
- if [ "${coverage}" == "" ]; then composer test; fi
- if [ "${coverage}" != "" ]; then composer coverage; fi
- composer lint
after_success:
- if [ "${coverage}" != "" ]; then travis_retry bin/coveralls -v; fi
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"behat --strict --profile ci"
],
"pre-test" : [
"bin/phinx migrate -c application/phinx.php",
"php -S localhost:8000 -t httpdocs httpdocs/index.php &"
],
"test" : [
Expand Down

0 comments on commit 01569aa

Please sign in to comment.