-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.scrutinizer.yml
75 lines (70 loc) · 2.94 KB
/
.scrutinizer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
custom_coding_standard:
git_repository: 'https://github.com/cakephp/cakephp-codesniffer.git'
git_version: 'a214ec6f7500ed391c4f8e6d50484bf5625605cc'
ruleset_path: 'CakePHP/ruleset.xml'
tools:
php_code_coverage: true
php_mess_detector: true
sensiolabs_security_checker: true
php_code_sniffer: true
php_loc:
enabled: true
excluded_dirs: [vendor, tests, config, docs, bin, webroot]
php_cpd:
enabled: true
excluded_dirs: [vendor, tests, config, docs, bin, webroot]
filter:
excluded_paths:
- bin/*
- vendor/*
- tests/*
- config/*
- docs/*
- webroot/*
build:
environment:
mysql: 5.6
elasticsearch: 2
php:
version: "7.1.0"
project_setup:
before:
- sudo composer self-update
- composer --version
- composer global require hirak/prestissimo --no-plugins
- composer install --prefer-dist --no-interaction
- ./bin/cake server -H localhost -p 3000 > /dev/null 2>&1 &
tests:
override:
-
command: './bin/phpunit --coverage-clover=coverage.xml'
coverage:
file: 'coverage.xml'
format: 'php-clover'
-
command: 'sh ./scripts/upload-codecov.sh'
coverage:
file: 'coverage.xml'
format: 'php-clover'
-
command: './bin/phpcs ./phpcs.xml --standard=./vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml ./src --report=checkstyle --report-file=cs-data'
analysis:
file: 'cs-data' # The reporter filename
format: 'php-cs-checkstyle' # The supported format by Scrutinizer
build_failure_conditions: # https://scrutinizer-ci.com/docs/configuration/build_status
#- 'patches.label("Doc Comments").exists' # No doc comments patches allowed
- 'patches.label("Spacing").new.count > 1' # More than 1 new spacing patch
- 'issues.label("coding-style").exists' # No coding style issues allowed
- 'issues.label("coding-style").new.exists' # No new coding style issues allowed
- 'issues.label("coding-style").new.count > 1' # More than 1 new coding style issues.
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
- 'project.metric("scrutinizer.quality", < 9)' # Code Quality Rating drops below 9
#- 'project.metric("scrutinizer.test_coverage", < 0.85)' # Code Coverage drops below 85%
# Code Coverage decreased from previous inspection by more than 1%
- 'project.metric_change("scrutinizer.test_coverage", < -0.1)'