Skip to content

Commit

Permalink
codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
widmogrod committed Aug 12, 2017
1 parent 023d55e commit e33ca11
Show file tree
Hide file tree
Showing 3 changed files with 400 additions and 10 deletions.
20 changes: 14 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,29 @@ php:
- hhvm

matrix:
include:
- php: 7.1
env: COVERAGE=yes
env: CHECK_STYLE=yes
allow_failures:
- php: hhvm

cache:
directories:
- $HOME/.composer/cache

before_script:
- composer self-update
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter

install:
- composer install --prefer-source

script:
- composer test
- composer check-code
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- if [[ $CHECK_STYLE == yes ]]; then composer check-code; fi
- if [[ $COVERAGE == yes ]]; then composer unitc; else composer unit; fi

after_success:
- if [[ $COVERAGE == yes ]]; then composer codeclimate-send-coverage; fi

notifications:
email: "widmogrod+php-functional@gmail.com"
email: false
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"description": "Functors, Applicative and Monads are fascinating concept. Purpose of this library is to explore them in OOP PHP world.",
"require-dev": {
"phpunit/phpunit": "^4.7",
"friendsofphp/php-cs-fixer": "^1.12"
"friendsofphp/php-cs-fixer": "^1.12",
"codeclimate/php-test-reporter": "^0.4.4"
},
"license": "MIT",
"authors": [
Expand All @@ -14,7 +15,9 @@
],
"prefer-stable": true,
"scripts": {
"test": "phpunit",
"unit": "phpunit --no-coverage",
"unitc": "phpunit --coverage-clover ./codecoverage.xml",
"codeclimate-send-coverage": "test-reporter --coverage-report=codecoverage.xml",
"fix-code": "php-cs-fixer fix",
"check-code": "php-cs-fixer fix --verbose --diff --dry-run"
},
Expand Down
Loading

0 comments on commit e33ca11

Please sign in to comment.