Skip to content

Commit

Permalink
Enable Psalm, Infection and Insights reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jul 25, 2020
1 parent d178daa commit 08131ba
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
@@ -1 +1,2 @@
github: drupol
custom: ["https://www.paypal.me/drupol"]
25 changes: 23 additions & 2 deletions .github/workflows/continuous-integration.yml
Expand Up @@ -17,6 +17,11 @@ jobs:
php-versions: ['7.1', '7.2', '7.3', '7.4']

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@master
with:
Expand All @@ -43,12 +48,28 @@ jobs:
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader

- name: Run Grumphp
run: vendor/bin/grumphp run
run: vendor/bin/grumphp run --no-ansi -n
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

- name: Scrutinizer
- name: Send PSALM data
run: vendor/bin/psalm --shepherd --stats
continue-on-error: true

- name: Send Scrutinizer data
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
continue-on-error: true

- name: Infection score report
run: |
vendor/bin/infection run -j 2
continue-on-error: true

- name: PHP Insights report
run: |
rm -rf composer.lock vendor
composer require nunomaduro/phpinsights --dev
vendor/bin/phpinsights analyse src/ -n
continue-on-error: true
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -3,6 +3,7 @@
[![Total Downloads](https://img.shields.io/packagist/dt/loophp/unaltered-psr-http-message-bridge-bundle.svg?style=flat-square)](https://packagist.org/packages/loophp/unaltered-psr-http-message-bridge-bundle)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/loophp/unaltered-psr-http-message-bridge-bundle/Continuous%20Integration/master?style=flat-square)](https://github.com/loophp/unaltered-psr-http-message-bridge-bundle/actions)
[![Scrutinizer code quality](https://img.shields.io/scrutinizer/quality/g/loophp/unaltered-psr-http-message-bridge-bundle/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/loophp/unaltered-psr-http-message-bridge-bundle/?branch=master)
[![Type Coverage](https://shepherd.dev/github/loophp/unaltered-psr-http-message-bridge-bundle/coverage.svg)](https://shepherd.dev/github/loophp/unaltered-psr-http-message-bridge-bundle)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/loophp/unaltered-psr-http-message-bridge-bundle/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/loophp/unaltered-psr-http-message-bridge-bundle/?branch=master)
[![License](https://img.shields.io/packagist/l/loophp/unaltered-psr-http-message-bridge-bundle.svg?style=flat-square)](https://packagist.org/packages/loophp/unaltered-psr-http-message-bridge-bundle)
[![Donate!](https://img.shields.io/badge/Sponsor-Github-brightgreen.svg?style=flat-square)](https://github.com/sponsors/drupol)
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Expand Up @@ -22,12 +22,13 @@
"symfony/psr-http-message-bridge": "^1 || ^2"
},
"require-dev": {
"drupol/php-conventions": "^1.7.1",
"drupol/php-conventions": "^1.7.2 || ^1.8.6",
"friends-of-phpspec/phpspec-code-coverage": "^4.3.2",
"infection/infection": "^0.13.6 || ^0.15.3 || ^0.16.3",
"infection/infection": "^0.13.6 || ^0.15.3",
"nyholm/psr7": "^1",
"phpspec/phpspec": "^5.1.2 || ^6.1.1",
"symfony/http-kernel": "^4 || ^5 || ^5.1"
"phpspec/phpspec": "^5.1.2 || ^6.2.1",
"symfony/http-kernel": "^4 || ^5 || ^5.1",
"vimeo/psalm": "^3.12"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 1 addition & 4 deletions grumphp.yml.dist
Expand Up @@ -3,15 +3,12 @@ imports:

parameters:
extra_tasks:
psalm: ~
phpspec:
verbose: true
metadata:
priority: 3000
infection:
threads: 1
test_framework: phpspec
configuration: infection.json.dist
min_msi: 50
min_covered_msi: 50
metadata:
priority: 2000
15 changes: 15 additions & 0 deletions psalm.xml
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
Expand Up @@ -15,9 +15,6 @@ class UnalteredPsrHttpMessageBridgeExtension extends Extension
* {@inheritdoc}
*
* @phpstan-ignore-next-line
*
* @param array $configs
* @param ContainerBuilder $container
*/
public function load(array $configs, ContainerBuilder $container): void
{
Expand Down

0 comments on commit 08131ba

Please sign in to comment.