Skip to content

Commit

Permalink
Merge pull request #7 from HavokInspiration/codecov
Browse files Browse the repository at this point in the history
Add codecov for code-coverage
  • Loading branch information
HavokInspiration committed Mar 1, 2016
2 parents db49963 + 92aefc2 commit eeb4fe0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ env:
- DEFAULT=1

matrix:
allow_failures:
- env: CODECOVERAGE=1 DEFAULT=0

fast_finish: true

include:
- php: 7.0
env: PHPCS=1 DEFAULT=0

- php: 7.0
env: CODECOVERAGE=1 DEFAULT=0

- php: 5.4
env: PREFER_LOWEST=1

Expand All @@ -35,6 +41,9 @@ before_script:
script:
- sh -c "if [ '$DEFAULT' = '1' ]; then phpunit --stderr; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml || true; fi"
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then wget -O codecov.sh https://codecov.io/bash; fi"
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then bash codecov.sh; fi"

notifications:
email: false
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.txt)
[![Build Status](https://img.shields.io/travis/HavokInspiration/wrench/master.svg?style=flat-square)](https://travis-ci.org/havokinspiration/wrench)
[![codecov.io](https://codecov.io/github/HavokInspiration/wrench/coverage.svg?branch=master)](https://codecov.io/github/HavokInspiration/wrench?branch=master)

Wrench is a CakePHP 3.X plugin that aims to provide an easy way to implement a **Maintenance Mode**
for your CakePHP website / applications.
Expand Down
6 changes: 6 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@
</blacklist>
</filter>

<!-- Prevent coverage reports from looking in tests, vendors, config folders -->
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit eeb4fe0

Please sign in to comment.