forked from tbolier/php-rethink-ql
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.scrutinizer.yml
70 lines (59 loc) · 2.31 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
before_commands:
- "composer install"
checks:
php: true
build:
environment:
timezone: 'Europe/Amsterdam'
variables:
integration_test_file: 'config_scrutinizer.php'
php:
version: '7.1'
ini:
'date.timezone': 'Europe/Amsterdam'
dependencies:
# Runs before inferred commands
before:
- 'source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list'
- 'wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -'
- 'sudo apt-get update -y'
- 'sudo apt-get install rethinkdb -y'
- 'sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf'
- 'sudo /etc/init.d/rethinkdb start'
# Overwrites inferred commands
override: []
# Runs after inferred commands
after: []
# Run after dependencies
project_setup:
before: []
override: []
after: []
nodes:
tests: true
analysis:
tests:
override:
-
command: phpcs-run --standard=phpcs.xml
use_website_config: false
- php-scrutinizer-run
build_failure_conditions:
# No critical issue is introduced (existing ones are tolerated)
- 'issues.label("coding-style").exists'
# No new critical issue is introduced (existing ones are tolerated)
- 'issues.label("coding-style").new.exists'
# No critical issue is present
- 'issues.severity(= MINOR).exists'
# No new critical issue is introduced (existing ones are tolerated)
- 'issues.severity(= MINOR).new.exists'
# Class has no tests
- 'classes.metric("php_code_coverage.coverage", = 0).exists'
# Rating is C or worse for existing classes
- 'elements.rating(<= D).exists'
# Rating is C or worse is introduced
- 'elements.rating(<= D).new.exists'
- 'project.metric("scrutinizer.quality", < 9)' # Code Quality Rating drops below 9
- 'project.metric("scrutinizer.test_coverage", < 0.85)' # Code Coverage drops below 90%
# Code Coverage decreased from previous inspection by more than 5%
- 'project.metric_change("scrutinizer.test_coverage", < -0.05)'