mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-22 04:26:02 +03:00
Improve Travis build (#231)
* Improve Travis build * Added more shields * bugfiz * minor * bash fix * Update min version * Remove test code * Refactor
This commit is contained in:
parent
21c95412c6
commit
8c2ffbfd3f
29
.travis.yml
29
.travis.yml
@ -1,17 +1,40 @@
|
||||
language: php
|
||||
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache/files
|
||||
|
||||
php:
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- hhvm
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.5
|
||||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" PREFER_COVERAGE=true
|
||||
|
||||
install:
|
||||
- travis_retry composer install
|
||||
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
|
||||
|
||||
before_script:
|
||||
- TEST_COMMAND="composer test-all"
|
||||
- if ! [[ "$TRAVIS_PULL_REQUEST" = false ]]; then TEST_COMMAND="composer test"; fi
|
||||
- if [[ "$PREFER_COVERAGE" = true ]] && [[ "$TRAVIS_PULL_REQUEST" = false ]]; then TEST_COMMAND="composer test-coverage" COVERAGE=true; fi
|
||||
|
||||
script:
|
||||
- composer test
|
||||
- '[[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && ( composer test-coverage ) || ( echo "Testing PR - No integration tests available")'
|
||||
- echo $TEST_COMMAND
|
||||
- $TEST_COMMAND
|
||||
|
||||
after_success:
|
||||
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
||||
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
|
||||
|
||||
|
||||
notifications:
|
||||
slack:
|
||||
|
@ -6,9 +6,12 @@ Below are examples to get you started. For additional examples, please see our
|
||||
official documentation
|
||||
at http://documentation.mailgun.com
|
||||
|
||||
[![Latest Stable Version](https://poser.pugx.org/mailgun/mailgun-php/v/stable.png)](https://packagist.org/packages/mailgun/mailgun-php)
|
||||
[![Build Status](https://travis-ci.org/mailgun/mailgun-php.png)](https://travis-ci.org/mailgun/mailgun-php)
|
||||
[![Latest Version](https://img.shields.io/github/release/mailgun/mailgun-php.svg?style=flat-square)](https://github.com/mailgun/mailgun-php/releases)
|
||||
[![Build Status](https://img.shields.io/travis/mailgun/mailgun-php.svg?style=flat-square)](https://travis-ci.org/mailgun/mailgun-php)
|
||||
[![StyleCI](https://styleci.io/repos/11654443/shield?branch=master)](https://styleci.io/repos/11654443)
|
||||
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/mailgun/mailgun-php.svg?style=flat-square)](https://scrutinizer-ci.com/g/mailgun/mailgun-php)
|
||||
[![Quality Score](https://img.shields.io/scrutinizer/g/mailgun/mailgun-php.svg?style=flat-square)](https://scrutinizer-ci.com/g/mailgun/mailgun-php)
|
||||
[![Total Downloads](https://img.shields.io/packagist/dt/mailgun/mailgun-php.svg?style=flat-square)](https://packagist.org/packages/mailgun/mailgun-php)
|
||||
|
||||
**This is the documentation for dev-master. You find documentation for the latest stable
|
||||
release [here](https://github.com/mailgun/mailgun-php/tree/v2.1.2).**
|
||||
|
@ -6,7 +6,7 @@
|
||||
"php-http/httplug": "^1.0",
|
||||
"php-http/multipart-stream-builder": "^0.1",
|
||||
"php-http/message": "^1.0",
|
||||
"php-http/client-common": "^1.0",
|
||||
"php-http/client-common": "^1.1",
|
||||
"php-http/discovery": "^1.0",
|
||||
"webmozart/assert": "^1.2"
|
||||
},
|
||||
@ -33,6 +33,8 @@
|
||||
],
|
||||
"scripts": {
|
||||
"test": "vendor/bin/phpunit --testsuite unit && vendor/bin/phpunit --testsuite functional",
|
||||
"test-coverage": "vendor/bin/phpunit --testsuite integration --coverage-text --coverage-clover=build/coverage.xml"
|
||||
"test-all": "vendor/bin/phpunit",
|
||||
"test-integration": "vendor/bin/phpunit --testsuite integration",
|
||||
"test-coverage": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user