.travis.yml
before_script:
- composer self-update
- composer install --prefer-dist
- "sh -c \"if [ '$DB' = 'mysql' ]; then mysql -e 'drop database if exists parm_namespaced_tests; create database parm_namespaced_tests;'; fi\""
- "sh -c \"if [ '$DB' = 'mysql' ]; then mysql parm_namespaced_tests < tests/data/namespaced-test-data.sql; fi\""
- "sh -c \"if [ '$DB' = 'mysql' ]; then mysql -e 'drop database if exists \\`parm-global-tests\\`; create database \\`parm-global-tests\\`;'; fi\""
- "sh -c \"if [ '$DB' = 'mysql' ]; then mysql parm-global-tests < tests/data/global-test-data.sql; fi\""
env:
- DB=mysql
language: php
php:
- 5.5
- 5.6
- 7.0
script: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
after_script:
- vendor/bin/test-reporter --stdout --coverage-report tests/build/logs/clover.xml > codeclimate.json
- "curl -X POST -d @codeclimate.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v0.1.1)' https://codeclimate.com/test_reports"
addons:
code_climate:
repo_token: 8203fc037080060805e300c50fc5c101369bbb665e1681a662531da5be723ab1