Skip to content

Commit 4edfd8f

Browse files
committed
Enable Psalm, Infection and Insights reports.
1 parent 04a3450 commit 4edfd8f

File tree

5 files changed

+41
-11
lines changed

5 files changed

+41
-11
lines changed

.github/workflows/continuous-integration.yml

+21-4
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@ jobs:
1717
php-versions: ['7.1', '7.2', '7.3', '7.4']
1818

1919
steps:
20+
- name: Set git to use LF
21+
run: |
22+
git config --global core.autocrlf false
23+
git config --global core.eol lf
24+
2025
- name: Checkout
21-
uses: actions/checkout@master
26+
uses: actions/checkout@v2.3.1
2227
with:
2328
fetch-depth: 1
2429

2530
- name: Install PHP
26-
uses: shivammathur/setup-php@master
31+
uses: shivammathur/setup-php@v2
2732
with:
2833
php-version: ${{ matrix.php-versions }}
2934
extensions: ast,mbstring,xdebug
@@ -34,7 +39,7 @@ jobs:
3439
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
3540

3641
- name: Cache dependencies
37-
uses: actions/cache@v1
42+
uses: actions/cache@v2
3843
with:
3944
path: ${{ steps.composer-cache.outputs.dir }}
4045
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -55,8 +60,20 @@ jobs:
5560
run: vendor/bin/psalm --shepherd --stats
5661
continue-on-error: true
5762

58-
- name: Scrutinizer
63+
- name: Send Scrutinizer data
5964
run: |
6065
wget https://scrutinizer-ci.com/ocular.phar
6166
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
6267
continue-on-error: true
68+
69+
- name: Infection score report
70+
run: |
71+
vendor/bin/infection run -j 2
72+
continue-on-error: true
73+
74+
- name: PHP Insights report
75+
run: |
76+
rm -rf composer.lock vendor
77+
composer require nunomaduro/phpinsights --dev
78+
vendor/bin/phpinsights analyse src/ -n
79+
continue-on-error: true

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/loophp/phptree/Continuous%20Integration?style=flat-square)](https://github.com/loophp/phptree/actions)
55
[![Scrutinizer code quality](https://img.shields.io/scrutinizer/quality/g/loophp/phptree/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/loophp/phptree/?branch=master)
66
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/loophp/phptree/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/loophp/phptree/?branch=master)
7+
[![Type Coverage](https://shepherd.dev/github/loophp/phptree/coverage.svg)](https://shepherd.dev/github/loophp/phptree)
78
[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/loophp/phptree/master)](https://stryker-mutator.github.io)
89
[![License](https://img.shields.io/packagist/l/loophp/phptree.svg?style=flat-square)](https://packagist.org/packages/loophp/phptree)
910
[![Donate!](https://img.shields.io/badge/Donate-Paypal-brightgreen.svg?style=flat-square)](https://paypal.me/loophp)

composer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@
2020
},
2121
"require-dev": {
2222
"drupol/launcher": "^2.2.2",
23-
"drupol/php-conventions": "^1.6.14",
23+
"drupol/php-conventions": "^1.7.2 || ^1.8.6",
2424
"drupol/phpmerkle": "^2.2",
2525
"friends-of-phpspec/phpspec-code-coverage": "^4.3.2",
2626
"graphp/graphviz": "^0.2",
2727
"infection/infection": "^0.13.6 || ^0.15.0",
2828
"microsoft/tolerant-php-parser": "^0.0.20",
2929
"nikic/php-parser": "^4.3",
3030
"phpbench/phpbench": "^0.16.10",
31-
"phpspec/phpspec": "^5.1.2 || ^6.1.1",
32-
"phptaskman/changelog": "^1.0"
31+
"phpspec/phpspec": "^5.1.2 || ^6.2.1",
32+
"phptaskman/changelog": "^1.0",
33+
"vimeo/psalm": "^3.12.2"
3334
},
3435
"config": {
3536
"sort-packages": true

grumphp.yml.dist

-4
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@ parameters:
1414
extra_tasks:
1515
phpspec:
1616
verbose: true
17-
metadata:
18-
priority: 3000
1917
infection:
2018
threads: 10
2119
test_framework: phpspec
2220
configuration: infection.json.dist
2321
min_msi: 90
2422
min_covered_msi: 90
25-
metadata:
26-
priority: 2000
2723

psalm.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
totallyTyped="false"
4+
resolveFromConfigFile="true"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xmlns="https://getpsalm.org/schema/config"
7+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
>
9+
<projectFiles>
10+
<directory name="src" />
11+
<ignoreFiles>
12+
<directory name="vendor" />
13+
</ignoreFiles>
14+
</projectFiles>
15+
</psalm>

0 commit comments

Comments
 (0)