Skip to content

Commit

Permalink
update static ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed Sep 23, 2024
1 parent 6736f6b commit 21a69ef
Showing 1 changed file with 42 additions and 22 deletions.
64 changes: 42 additions & 22 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,67 @@
on: [ pull_request ]
name: Static analysis

on: [push, pull_request]

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: apcu, redis
coverage: none
tools: phpstan:1.12, cs2pr

- name: Download dependencies
run: |
composer update --no-interaction --prefer-dist --optimize-autoloader
uses: ramsey/composer-install@v2

- name: PHPStan
uses: docker://oskarstark/phpstan-ga
with:
entrypoint: /composer/vendor/bin/phpstan
args: analyze --no-progress
run: phpstan analyze --no-progress --error-format=checkstyle | cs2pr

php-cs-fixer:
name: PHP-CS-Fixer
psalm:
name: Psalm
runs-on: ubuntu-latest

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

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
args: --dry-run --diff-format udiff
php-version: 8.3
extensions: apcu, redis
coverage: none
tools: vimeo/psalm:5.26

psalm:
name: Psalm
- name: Download dependencies
uses: ramsey/composer-install@v2

- name: Psalm
run: psalm --no-progress --output-format=github

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest

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

- name: Psalm
uses: docker://vimeo/psalm-github-actions
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
args: --no-progress --show-info=false --stats
php-version: 8.3
coverage: none
tools: php-cs-fixer:3.64, cs2pr

- name: Display PHP-CS-Fixer version
run: sleep 1 && php-cs-fixer --version

- name: PHP-CS-Fixer
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr

0 comments on commit 21a69ef

Please sign in to comment.