Skip to content

Commit 75f6e58

Browse files
author
Andrey Helldar
authored
Merge pull request #3 from andrey-helldar/scrutinizer
Scrutinizer
2 parents 1bd9937 + 9bec3eb commit 75f6e58

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ tests/ export-ignore
77
.editorconfig export-ignore
88
.gitattributes export-ignore
99
.gitignore export-ignore
10+
.scrutinizer.yml export-ignore
1011
.styleci.yml export-ignore
1112
phpunit.yml export-ignore

.github/workflows/phpunit.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,33 @@ jobs:
3434
run: |
3535
mkdir -p build/logs
3636
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
37+
38+
scrutinizer:
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v2
44+
45+
- name: Setup PHP
46+
uses: shivammathur/setup-php@v2
47+
with:
48+
php-version: 7.4
49+
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv
50+
coverage: xdebug
51+
52+
- name: Composer self update
53+
run: composer self-update
54+
55+
- name: Install dependencies
56+
run: composer update --prefer-dist --no-progress --no-interaction --no-suggest
57+
58+
- name: Execute tests
59+
run: |
60+
mkdir -p build/logs
61+
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
62+
63+
- name: Scrutinizer CI
64+
run: |
65+
wget https://scrutinizer-ci.com/ocular.phar
66+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover

.scrutinizer.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
filter:
2+
excluded_paths:
3+
- .github/*
4+
- tests/*
5+
- vendor/*
6+
7+
checks:
8+
php:
9+
code_rating: true
10+
duplication: true
11+
remove_extra_empty_lines: true
12+
remove_php_closing_tag: true
13+
remove_trailing_whitespace: true
14+
fix_use_statements:
15+
remove_unused: true
16+
preserve_multiple: false
17+
preserve_blanklines: true
18+
order_alphabetically: true
19+
fix_php_opening_tag: true
20+
fix_linefeed: true
21+
fix_line_ending: true
22+
fix_identation_4spaces: true
23+
fix_doc_comments: true
24+
25+
tools:
26+
external_code_coverage:
27+
timeout: 300
28+
runs: 6
29+
php_code_sniffer:
30+
enabled: true
31+
config:
32+
standard: PSR12
33+
filter:
34+
paths: [ 'src' ]
35+
php_loc:
36+
enabled: true
37+
php_cpd:
38+
enabled: true

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
[![StyleCI Status][badge_styleci]][link_styleci]
88
[![Github Workflow Status][badge_build]][link_build]
9+
[![Coverage Status][badge_coverage]][link_scrutinizer]
910
[![Scrutinizer Code Quality][badge_quality]][link_scrutinizer]
1011

1112
[![Stable Version][badge_stable]][link_packagist]
@@ -164,6 +165,8 @@ php artisan migrate:actions:status
164165

165166
[badge_license]: https://img.shields.io/packagist/l/andrey-helldar/laravel-actions.svg?style=flat-square
166167

168+
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/andrey-helldar/laravel-actions.svg?style=flat-square
169+
167170
[badge_quality]: https://img.shields.io/scrutinizer/g/andrey-helldar/laravel-actions.svg?style=flat-square
168171

169172
[badge_stable]: https://img.shields.io/github/v/release/andrey-helldar/laravel-actions?label=stable&style=flat-square

0 commit comments

Comments
 (0)