Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 45 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,66 @@
name: Composer
on: [push]
name: Code Quality
on: [pull_request]

jobs:
php-quality:
Codestyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Cache Composer dependencies
uses: actions/cache@v2
- uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v5
with:
php_version: 7.4
version: latest
- name: php-cs-fixer
- name: PHP cs-fixer
uses: docker://php:7.4
with:
args: vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no

PHPStan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v5
with:
php_version: 7.4
version: latest
- name: PHPStan
uses: docker://php:7.4
with:
args: vendor/bin/phpstan analyse -c phpstan.neon
- name: phpunit

PHPUnit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v5
with:
php_version: 7.4
version: latest
- name: PHPUnit
uses: docker://php:7.4
with:
args: vendor/bin/simple-phpunit
args: vendor/bin/phpunit
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@
/.php_cs
/.php_cs.cache
###< friendsofphp/php-cs-fixer ###

.idea

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.18",
"phpstan/phpstan": "^0.12.81",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^4.4",
"symfony/css-selector": "^4.4",
"symfony/debug-bundle": "^4.4",
Expand Down
Loading