Skip to content

Commit

Permalink
feat: shepherd badges and psalm action
Browse files Browse the repository at this point in the history
  • Loading branch information
vfunin committed Jul 28, 2023
1 parent 8207716 commit 287a633
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Psalm

on:
push:
branches: [ "master", "main" ]
pull_request:

jobs:
psalm:
runs-on: ubuntu-latest
name: Psalm complete run
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2

- name: Install Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader

- name: Static analysis
run: ./vendor/bin/psalm --config='./psalm.xml' --shepherd --stats --output-format=github --php-version='8.2'
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fvfunin%2Fdev-ci-kit%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/vfunin/dev-ci-kit/master)
[![codecov](https://codecov.io/gh/vfunin/dev-ci-kit/branch/master/graph/badge.svg?token=ER6NMU4XDO)](https://codecov.io/gh/vfunin/dev-ci-kit)
[![psalm-level](https://shepherd.dev/github/vfunin/dev-ci-kit/level.svg)](https://shepherd.dev/github/vfunin/dev-ci-kit)
[![type-coverage](https://shepherd.dev/github/vfunin/dev-ci-kit/coverage.svg)](https://shepherd.dev/github/vfunin/dev-ci-kit)


# Dev CI Kit

Expand Down
12 changes: 12 additions & 0 deletions src/Composer/DevCIKitPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
*/
class DevCIKitPlugin implements PluginInterface, EventSubscriberInterface
{
/**
* @psalm-suppress UnusedProperty
*/
public function activate(Composer $composer, IOInterface $io): void
{
}
Expand All @@ -38,6 +41,9 @@ public static function init(Event $event, ?Filesystem $filesystem = null): void
(new self())->copyFiles($event, $filesystem);
}

/**
* @psalm-suppress PossiblyUnusedParam
*/
public function copyFiles(Event $event, ?Filesystem $filesystem = null): void
{
$filesystem ??= new Filesystem();
Expand Down Expand Up @@ -79,10 +85,16 @@ public function copyFiles(Event $event, ?Filesystem $filesystem = null): void
);
}

/**
* @psalm-suppress UnusedProperty
*/
public function deactivate(Composer $composer, IOInterface $io)
{
}

/**
* @psalm-suppress UnusedProperty
*/
public function uninstall(Composer $composer, IOInterface $io)
{
}
Expand Down

0 comments on commit 287a633

Please sign in to comment.