Skip to content

Commit 232a30a

Browse files
committed
Enable code coverage in Scrutinizer
1 parent 7c21e54 commit 232a30a

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.scrutinizer.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
filter:
2+
excluded_paths: [ 'vendor/*', 'tests/*', 'samples/*', 'src/PhpWord/Shared/PCLZip/*' ]
3+
4+
before_commands:
5+
- "composer install --prefer-source --dev"
6+
7+
tools:
8+
external_code_coverage:
9+
enabled: true
10+
timeout: 900
11+
php_code_coverage:
12+
enabled: false
13+
test_command: phpunit -c phpunit.xml.dist
14+
php_sim: true
15+
php_pdepend: true
16+
php_analyzer: true

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ script:
4848
#- php phploc.phar src/
4949
## PHPUnit
5050
- phpunit -c ./ --coverage-text
51+
52+
after_script:
53+
## Scrutinizer
54+
- wget https://scrutinizer-ci.com/ocular.phar
55+
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

phpunit.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@
2121
</exclude>
2222
</whitelist>
2323
</filter>
24+
<logging>
25+
<log type="coverage-clover" target="./build/logs/clover.xml" />
26+
</logging>
2427
</phpunit>

0 commit comments

Comments
 (0)