Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ php:
- 5.4
- 5.5
- 5.6
- 7.0

sudo: false

Expand All @@ -20,29 +21,31 @@ matrix:
fast_finish: true

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

- php: 5.4
env: COVERALLS=1 DEFAULT=0 DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'
- php: 7.0
env: CODECOVERAGE=1 DEFAULT=0 DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'

before_script:
- phpenv config-rm xdebug.ini

- composer self-update
- composer install --prefer-dist --no-interaction

- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"

- sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:dev-master; fi"

- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer; fi"

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 [ '$COVERALLS' = '1' ]; then phpunit --stderr --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/coveralls -c .coveralls.yml -v; fi"
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit; 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Tags

[![Build Status](https://img.shields.io/travis/UseMuffin/Tags/master.svg?style=flat-square)](https://travis-ci.org/UseMuffin/Tags)
[![Coverage](https://img.shields.io/coveralls/UseMuffin/Tags/master.svg?style=flat-square)](https://coveralls.io/r/UseMuffin/Tags)
[![Coverage](https://img.shields.io/codecov/c/github/UseMuffin/Tags.svg?style=flat-square)](https://codecov.io/github/UseMuffin/Tags)
[![Total Downloads](https://img.shields.io/packagist/dt/muffin/tags.svg?style=flat-square)](https://packagist.org/packages/muffin/tags)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)

Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
"issues": "https://github.com/usemuffin/tags/issues",
"source": "https://github.com/usemuffin/tags"
},
"require": {
"cakephp/orm": "~3.0"
},
"require-dev": {
"cakephp/cakephp": "~3.0",
"cakephp/cakephp-codesniffer": "2.*",
"phpunit/phpunit": "4.1.*",
"muffin/slug": "dev-master"
"phpunit/phpunit": "~4.1",
"muffin/slug": "~1.0"
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 3 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@
</listener>
</listeners>

<!-- Prevent coverage reports from looking in tests and vendors -->
<filter>
<blacklist>
<directory suffix=".php">./vendor/</directory>
<directory suffix=".ctp">./vendor/</directory>

<directory suffix=".php">./tests/</directory>
<directory suffix=".ctp">./tests/</directory>
</blacklist>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>