mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #360 from gordonbanderson/coverage_ss_branch
ENHANCEMENT: Added code coverage and extra badges on the README
This commit is contained in:
commit
7248d21b31
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
|
||||
[![Build Status](https://travis-ci.org/silverstripe/silverstripe-blog.svg?branch=master)](https://travis-ci.org/silverstripe/silverstripe-blog)
|
||||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-blog/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-blog/?branch=master)
|
||||
[![Build Status](https://scrutinizer-ci.com/g/silverstripe/silverstripe-blog/badges/build.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-blog/build-status/master)
|
||||
[![codecov.io](https://codecov.io/github/silverstripe/silverstripe-blog/coverage.svg?branch=master)](https://codecov.io/github/silverstripe/silverstripe-blog?branch=master)
|
||||
|
||||
[![Latest Stable Version](https://poser.pugx.org/silverstripe/blog/version)](https://packagist.org/packages/silverstripe/blog)
|
||||
[![Latest Unstable Version](https://poser.pugx.org/silverstripe/blog/v/unstable)](//packagist.org/packages/silverstripe/blog)
|
||||
[![Total Downloads](https://poser.pugx.org/silverstripe/blog/downloads)](https://packagist.org/packages/silverstripe/blog)
|
||||
[![License](https://poser.pugx.org/silverstripe/blog/license)](https://packagist.org/packages/silverstripe/blog)
|
||||
[![Monthly Downloads](https://poser.pugx.org/silverstripe/blog/d/monthly)](https://packagist.org/packages/silverstripe/blog)
|
||||
[![Daily Downloads](https://poser.pugx.org/silverstripe/blog/d/daily)](https://packagist.org/packages/silverstripe/blog)
|
||||
|
||||
[![Dependency Status](https://www.versioneye.com/php/silverstripe:blog/badge.svg)](https://www.versioneye.com/php/silverstripe:blog)
|
||||
[![Reference Status](https://www.versioneye.com/php/silverstripe:blog/reference_badge.svg?style=flat)](https://www.versioneye.com/php/silverstripe:blog/references)
|
||||
|
||||
![codecov.io](https://codecov.io/github/silverstripe/silverstripe-blog/branch.svg?branch=master)
|
||||
|
||||
[![Build Status](https://travis-ci.org/silverstripe/silverstripe-blog.png?branch=master)](https://travis-ci.org/silverstripe/silverstripe-blog) [![Latest Stable Version](https://poser.pugx.org/silverstripe/blog/v/stable.svg)](https://packagist.org/packages/silverstripe/blog) [![Total Downloads](https://poser.pugx.org/silverstripe/blog/downloads.svg)](https://packagist.org/packages/silverstripe/blog) [![Latest Unstable Version](https://poser.pugx.org/silverstripe/blog/v/unstable.svg)](https://packagist.org/silverstripe/silverstripe/blog) [![License](https://poser.pugx.org/silverstripe/blog/license.svg)](https://packagist.org/packages/silverstripe/blog)
|
||||
|
||||
## Documentation
|
||||
[User guide](docs/en/userguide/index.md)
|
||||
|
Loading…
Reference in New Issue
Block a user