Skip to content

Commit

Permalink
Merge pull request #16 from shopwareLabs/add-coveralls-support
Browse files Browse the repository at this point in the history
Add coverall support
  • Loading branch information
mitelg authored Jun 1, 2017
2 parents d282366 + 6525dce commit 494754d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ Add the `psh` symlink to your `.sw-zip-blacklist` to prevent releasing a dead sy
local:unit-coverage - Generates coverage to ~/plugin-coverage/{plugin-name}
```

## Coverall support on travis

[coveralls.io](https://coveralls.io/)

1. Create a `build/logs/` directory in your plugin
2. Execute your tests `./psh travis:unit-coveralls`
3. Add to the travis `after_success` this line `./psh travis:send-coverall-report` to send the coverage report

## Example

You can find an example here: https://github.com/shopwareLabs/SwagBackendOrder
Binary file added coveralls.phar
Binary file not shown.
3 changes: 3 additions & 0 deletions travis/send-coverall-report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

./vendor/shopware/plugin-dev-tools/coveralls.phar -x build/logs/coverage_clover.xml -v
3 changes: 3 additions & 0 deletions travis/unit-coveralls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

SHOPWARE_ENV=__ENV__ __SHOPWARE_ROOT__vendor/phpunit/phpunit/phpunit --coverage-clover=build/logs/coverage_clover.xml --verbose

0 comments on commit 494754d

Please sign in to comment.