Skip to content

Commit

Permalink
Merge pull request #34 from Chiliec/feature/code-coverage
Browse files Browse the repository at this point in the history
Set up codecoverage report via codeclimate
  • Loading branch information
chiliec authored Sep 9, 2017
2 parents fabb248 + f6efd00 commit eff0847
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/vendor/*
tests/_output/*
tests/_output/*
cc-test-reporter
clover.xml
18 changes: 14 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ language: php

php:
- 5.4
- 5.5
- 5.6
- hhvm
- 7.1
- nightly

matrix:
allow_failures:
- php: nightly

sudo: false

before_install:
- composer config -g github-oauth.github.com "$GITHUB_TOKEN"
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build

install:
- composer global require "fxp/composer-asset-plugin:^1.2.0"
Expand All @@ -18,4 +24,8 @@ install:
- composer update

script:
- codecept run
- codecept run unit --coverage --coverage-xml --fail-fast

after_script:
- cp "$TRAVIS_BUILD_DIR"/tests/_output/coverage.xml "$TRAVIS_BUILD_DIR"/clover.xml
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --coverage-input-type=clover --exit-code $TRAVIS_TEST_RESULT; fi
10 changes: 10 additions & 0 deletions codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ settings:
memory_limit: 1024M
coverage:
enabled: true
remote: false
include:
- actions/*
- behaviors/*
- components/*
- controllers/*
- migrations/*
- models/*
- widgets/*
- Module.php
extensions:
enabled:
- Codeception\Extension\RunFailed
Expand Down

0 comments on commit eff0847

Please sign in to comment.