-
Notifications
You must be signed in to change notification settings - Fork 2
/
.scrutinizer.yml
59 lines (46 loc) · 1.88 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
filter:
excluded_paths:
- 'bin/*'
- 'tests/*'
- 'var/*'
dependency_paths:
- 'vendor/'
checks:
php: true
build:
dependencies:
before:
- restore-from-cache repository "dependencies"
- restore-from-cache repository "phpunit"
- sudo mv /usr/bin/composer.phar /usr/bin/composer && sudo chmod +x /usr/bin/composer
override:
- composer install --no-interaction --optimize-autoloader
- command: wget https://get.symfony.com/cli/installer -O - | bash
only_if: '[ "$SCRUTINIZER_BRANCH" == "master" ] && [ -z "$SCRUTINIZER_PR_SOURCE_BRANCH" ]'
after:
- store-in-cache repository "dependencies" vendor/
nodes:
coverage:
tests:
override:
- composer validate
- ./bin/php-cs-fixer fix --dry-run -v
- command: '~/.symfony/bin/symfony security:check --force-update'
only_if: '[ "$SCRUTINIZER_BRANCH" == "master" ] && [ -z "$SCRUTINIZER_PR_SOURCE_BRANCH" ]'
- command: './bin/phpunit --coverage-clover=coverage-clover.xml'
coverage:
file: 'coverage-clover.xml'
format: 'clover'
- php-scrutinizer-run
after:
- store-in-cache repository "phpunit" vendor/bin/.phpunit/
environment:
php:
version: '7.2'
pecl_extensions:
- pcov
- zip
build_failure_conditions:
- 'elements.rating(<= D).new.exists' # No new classes/methods with a rating of D or worse.
- 'project.metric("scrutinizer.quality", < 8)' # Code Quality Rating drops below 8.
- 'project.metric("scrutinizer.test_coverage", < 0.80)' # Code Coverage drops below 80%.