Skip to content

Commit

Permalink
Send code coverage to Scrutinizer CI
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed Nov 17, 2022
1 parent 86690c5 commit fe8587d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Expand Up @@ -64,9 +64,13 @@ jobs:
- run: vendor/bin/phpunit --no-coverage
if: ${{ !matrix.coverage }}

- run: vendor/bin/phpunit --coverage-text
- run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
if: ${{ matrix.coverage }}

- run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
if: ${{ matrix.coverage }}
continue-on-error: true

phpstan:
name: PHPStan
runs-on: ubuntu-latest
Expand Down
46 changes: 46 additions & 0 deletions .scrutinizer.yml
@@ -0,0 +1,46 @@
filter:
excluded_paths: [tests/*]
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
excluded_dependencies:
- commonmark/commonmark.js
tools:
external_code_coverage:
timeout: 1800
runs: 2
php_analyzer: true
php_code_coverage: false
php_code_sniffer:
config:
standard: PSR2
filter:
paths: ['src']
php_cpd:
enabled: true
excluded_dirs: [vendor, tests]
php_loc:
enabled: true
excluded_dirs: [vendor, tests]
php_pdepend: true
php_sim: true

1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -28,6 +28,7 @@
"require-dev": {
"phpstan/phpstan": "^1.9.2",
"phpunit/phpunit": "^9.5.5",
"scrutinizer/ocular": "^1.8.1",
"unleashedtech/php-coding-standard": "^3.1",
"vimeo/psalm": "^4.30.0"
},
Expand Down

0 comments on commit fe8587d

Please sign in to comment.