mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00:00
ENHANCEMENT: Added code coverage and extra badges on the home page
This commit is contained in:
parent
a9e0b93f5a
commit
d8dc1e335c
25
.travis.yml
25
.travis.yml
@ -7,16 +7,25 @@ addons:
|
||||
packages:
|
||||
- tidy
|
||||
|
||||
before_install:
|
||||
- pip install --user codecov
|
||||
|
||||
env:
|
||||
global:
|
||||
- DB=MYSQL CORE_RELEASE=3.1
|
||||
|
||||
# Turn coverage off by default, as it's expensive time wise
|
||||
- COVERAGE=0
|
||||
|
||||
# The path of the module when installed by composer
|
||||
- MODULE_PATH=blog
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: hhvm-nightly
|
||||
include:
|
||||
- php: 5.6
|
||||
env: DB=MYSQL
|
||||
env: DB=MYSQL COVERAGE=1
|
||||
- php: 5.5
|
||||
env: DB=MYSQL
|
||||
- php: 5.4
|
||||
@ -35,5 +44,17 @@ before_script:
|
||||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
|
||||
- cd ~/builds/ss
|
||||
|
||||
#Execute tests with or without coverage
|
||||
script:
|
||||
- vendor/bin/phpunit blog/tests/
|
||||
# Execute tests with no coverage. This is the fastest option
|
||||
- "if [ \"$COVERAGE\" = \"0\" ]; then vendor/bin/phpunit $MODULE_PATH/tests/; fi"
|
||||
|
||||
# Execute tests with coverage. Do this for a small
|
||||
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover $MODULE_PATH/tests/; fi"
|
||||
|
||||
#Upload coverage even if there is a failure
|
||||
after_script:
|
||||
- "if [ \"$COVERAGE\" = \"1\" ]; then mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/; fi"
|
||||
- cd ~/build/$TRAVIS_REPO_SLUG
|
||||
- wget https://scrutinizer-ci.com/ocular.phar
|
||||
- "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov && travis_retry php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi"
|
||||
|
17
README.md
17
README.md
@ -1,6 +1,21 @@
|
||||
# SilverStripe Blog Module
|
||||
[](https://travis-ci.org/silverstripe/silverstripe-blog)
|
||||
[](https://scrutinizer-ci.com/g/silverstripe/silverstripe-blog/?branch=master)
|
||||
[](https://scrutinizer-ci.com/g/silverstripe/silverstripe-blog/build-status/master)
|
||||
[](https://codecov.io/github/silverstripe/silverstripe-blog?branch=master)
|
||||
|
||||
[](https://packagist.org/packages/silverstripe/blog)
|
||||
[](//packagist.org/packages/silverstripe/blog)
|
||||
[](https://packagist.org/packages/silverstripe/blog)
|
||||
[](https://packagist.org/packages/silverstripe/blog)
|
||||
[](https://packagist.org/packages/silverstripe/blog)
|
||||
[](https://packagist.org/packages/silverstripe/blog)
|
||||
|
||||
[](https://www.versioneye.com/php/silverstripe:blog)
|
||||
[](https://www.versioneye.com/php/silverstripe:blog/references)
|
||||
|
||||

|
||||
|
||||
[](https://travis-ci.org/silverstripe/silverstripe-blog) [](https://packagist.org/packages/silverstripe/blog) [](https://packagist.org/packages/silverstripe/blog) [](https://packagist.org/silverstripe/silverstripe/blog) [](https://packagist.org/packages/silverstripe/blog)
|
||||
|
||||
## Documentation
|
||||
[User guide](docs/en/userguide/index.md)
|
||||
|
Loading…
x
Reference in New Issue
Block a user