Skip to content
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ tests/ export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
.styleci.yml export-ignore
phpunit.yml export-ignore
30 changes: 30 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,33 @@ jobs:
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

scrutinizer:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv
coverage: xdebug

- name: Composer self update
run: composer self-update

- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-interaction --no-suggest

- name: Execute tests
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

- name: Scrutinizer CI
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
38 changes: 38 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
filter:
excluded_paths:
- .github/*
- tests/*
- vendor/*

checks:
php:
code_rating: true
duplication: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true

tools:
external_code_coverage:
timeout: 300
runs: 6
php_code_sniffer:
enabled: true
config:
standard: PSR12
filter:
paths: [ 'src' ]
php_loc:
enabled: true
php_cpd:
enabled: true
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

[![StyleCI Status][badge_styleci]][link_styleci]
[![Github Workflow Status][badge_build]][link_build]
[![Coverage Status][badge_coverage]][link_scrutinizer]
[![Scrutinizer Code Quality][badge_quality]][link_scrutinizer]

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

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

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

[badge_quality]: https://img.shields.io/scrutinizer/g/andrey-helldar/laravel-actions.svg?style=flat-square

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