Skip to content

Commit

Permalink
Update projcet build script
Browse files Browse the repository at this point in the history
  • Loading branch information
maso committed Nov 13, 2017
1 parent 7f469a4 commit 2b54f08
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
service_name: travis-ci
coverage_clover: tests/clover.xml
json_path: tests/coveralls-upload.json
28 changes: 21 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
language: php
php:
- '5.6'
- '7.1'

services:
- mysql

git:
depth: 1

mysql:
database: test
Expand All @@ -9,16 +16,23 @@ mysql:

before_install:
- sudo apt-get update > /dev/null
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
- php composer-setup.php
- php -r "unlink('composer-setup.php');"

- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'

install:
- php composer.phar install
# Install composer packages, will also trigger dump-autoload
- travis_retry composer install --no-interaction
# Install coveralls.phar
- wget -c -nc --retry-connrefused --tries=0 https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
- chmod +x coveralls.phar
- php coveralls.phar --version

script:
- cd tests
- php run.php
- php coverage-checker.php clover.xml 70
- cd ..

after_success:
# Submit coverage report to Coveralls servers, see .coveralls.yml
- travis_retry php coveralls.phar -v
# Submit coverage report to codecov.io
- bash <(curl -s https://codecov.io/bash)

0 comments on commit 2b54f08

Please sign in to comment.