Skip to content

Commit

Permalink
Update actions workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Feb 5, 2024
1 parent 95f115f commit f435e0d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 35 deletions.
50 changes: 15 additions & 35 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,18 @@ concurrency:
cancel-in-progress: true

jobs:
mutation:
name: PHP ${{ matrix.php }}-${{ matrix.os }}

runs-on: ${{ matrix.os }}

strategy:
matrix:
os:
- ubuntu-latest

php:
- 8.1
- 8.2
- 8.3

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
tools: composer:v2, cs2pr
coverage: none

- name: Update composer
run: composer self-update

- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader

- name: Static analysis
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize
psalm:
uses: yiisoft/actions/.github/workflows/psalm.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3']
psalm80:
uses: yiisoft/actions/.github/workflows/psalm.yml@master
with:
psalm-config: psalm80.xml
os: >-
['ubuntu-latest']
php: >-
['8.0']
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
<RiskyTruthyFalsyComparison errorLevel="suppress" />
</issueHandlers>
</psalm>
19 changes: 19 additions & 0 deletions psalm80.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
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>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
</issueHandlers>
</psalm>
9 changes: 9 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
Expand All @@ -19,4 +22,10 @@
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_80,
]);

$rectorConfig->skip([
ClosureToArrowFunctionRector::class,
JsonThrowOnErrorRector::class,
ReadOnlyPropertyRector::class,
]);
};

0 comments on commit f435e0d

Please sign in to comment.