Skip to content

Commit

Permalink
Bump CI rules (#9)
Browse files Browse the repository at this point in the history
* bump CI rules

* fix
  • Loading branch information
Nyholm authored Jan 4, 2023
1 parent 8155b71 commit 07d4c81
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Tests
on: [push, pull_request]
on: [pull_request]

jobs:

Expand All @@ -9,7 +9,7 @@ jobs:
strategy:
max-parallel: 10
matrix:
php: ['7.3', '7.4', '8.0']
php: ['7.3', '7.4', '8.0', '8.1', '8.2']

steps:
- name: Set up PHP
Expand Down
66 changes: 48 additions & 18 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,67 @@
on: [push, pull_request]
on: [ pull_request ]
name: Static analysis

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

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

- name: PHPStan
uses: docker://oskarstark/phpstan-ga
env:
REQUIRE_DEV: true
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
args: analyze --no-progress
php-version: 8.1
extensions: apcu, redis
coverage: none
tools: phpstan:1.6.8, cs2pr

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --dry-run --diff-format udiff
- name: Download dependencies
uses: ramsey/composer-install@v1

- name: PHPStan
run: phpstan analyze --no-progress --error-format=checkstyle | cs2pr

psalm:
name: Psalm
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: apcu, redis
coverage: none
tools: vimeo/psalm:4.22.0

- name: Download dependencies
uses: ramsey/composer-install@v1

- name: Psalm
uses: docker://vimeo/psalm-github-actions
run: psalm --no-progress --output-format=github

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

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
tools: php-cs-fixer:3.13, cs2pr

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

- name: PHP-CS-Fixer
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/.php_cs.cache
/.php-cs-fixer.cache
/.phpunit.result.cache
/composer.lock
/phpunit.xml
Expand Down
13 changes: 13 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
;

return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
])
->setFinder($finder)
;
14 changes: 0 additions & 14 deletions .php_cs

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"symfony/messenger": "^4.4 || ^5.0 || ^6.0"
},
"require-dev": {
"phpunit/phpunit": "^8.4",
"phpunit/phpunit": "^8.5.31",
"symfony/validator": "^5.0 || ^6.0",
"symfony/polyfill-php80": "^1.17",
"symfony/event-dispatcher-contracts": "^2.0"
Expand Down

0 comments on commit 07d4c81

Please sign in to comment.