Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Scrutinizer-CI to the build pipeline #2756

Merged
merged 2 commits into from
Jun 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
build:
environment:
php:
version: 7.1

before_commands:
- "composer install --no-dev --prefer-source"

tools:
external_code_coverage:
timeout: 3600

filter:
excluded_paths:
- docs
- tools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This folder doesn't exist here


build_failure_conditions:
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed
- 'issues.label("coding-style").new.exists' # No new coding style issues allowed
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
- 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection
- 'patches.label("Doc Comments").new.exists' # No new doc comments patches allowed
- 'patches.label("Unused Use Statements").new.exists' # No new unused imports patches allowed
5 changes: 5 additions & 0 deletions .travis.coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set -x
if [ "$TRAVIS_PHP_VERSION" = '7.1' ] ; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will run the code for ALL PHP 7.1 builds, it would be better to have it only for specific platform as well.

wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover ./clover.xml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clover.xml will not be magically generated, we need to pass the flags to PHPUnit

fi
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ matrix:
allow_failures:
- php: nightly

after_script:
- sh .travis.coverage.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep the config here so we won't have to maintain multiple files (kind of what we have in the ORM)


install:
- travis_retry composer install

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
| [Master][Master] | [2.5][2.5] |
|:----------------:|:----------:|
| [![Build status][Master image]][Master] | [![Build status][2.5 image]][2.5] |
| [![Code Coverage](https://scrutinizer-ci.com/g/doctrine/dbal/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/dbal/?branch=master) | [![Code Coverage](https://scrutinizer-ci.com/g/doctrine/dbal/badges/coverage.png?b=2.5)](https://scrutinizer-ci.com/g/doctrine/dbal/?branch=2.5) |


Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.
Expand Down