Skip to content

Commit

Permalink
Updated travis yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyharris committed Feb 20, 2020
1 parent 88f8273 commit 202bce1
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: php

services:
- postgresql
- mysql

php:
- 7.2
- 7.3
Expand All @@ -8,32 +12,23 @@ php:
sudo: false

env:
- DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'
- DB=pgsql db_dsn='postgres://travis@127.0.0.1/cakephp_test'
- DB=sqlite
matrix:
- DB=mysql DB_DSN='mysql://root@127.0.0.1/cakephp_test'
- DB=pgsql DB_DSN='postgres://postgres@127.0.0.1/cakephp_test'
- DB=sqlite DB_DSN='sqlite:///:memory:'

matrix:
fast_finish: true
include:
- php: 7.2
env: COVERAGE=1

before_install:
- 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

install:
- composer self-update
- composer install --prefer-dist --no-interaction

before_script:
- if [[ $DB == 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
- if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
- phpenv rehash
- set +H

script:
- if [[ $COVERAGE == 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $COVERAGE != 1 ]]; then vendor/bin/phpunit; fi

after_success:
- if [[ $COVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
- vendor/bin/phpunit

notifications:
email: false

0 comments on commit 202bce1

Please sign in to comment.