-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 29dd64e
Showing
19 changed files
with
11,641 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
env: | ||
COMPOSER_CACHE_DIR: /tmp/_composer_cache | ||
|
||
jobs: | ||
unit-tests: | ||
name: Tests for php${{ matrix.php-versions }} ${{ matrix.name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: ['8.1', '8.2', '8.3', '8.4'] | ||
composer-command: ['install'] | ||
include: | ||
- php-versions: '8.1' | ||
composer-command: 'update --prefer-lowest --prefer-dist --prefer-stable --no-interaction' | ||
name: prefer-lowest | ||
steps: | ||
- name: Set up php${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip,gmp | ||
coverage: xdebug | ||
ini-file: development | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Cache composer cache directory | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: composer-cache | ||
- name: Unit tests | ||
run: | | ||
composer ${{ matrix.composer-command }} | ||
composer test | ||
linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up php${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip,gmp | ||
coverage: xdebug | ||
ini-file: development | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Cache composer cache directory | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: composer-cache | ||
- name: Unit tests | ||
run: | | ||
composer install | ||
result=0 | ||
composer run cs || result=1 | ||
composer run phpstan || result=1 | ||
exit $result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/vendor | ||
/var | ||
/.php_cs | ||
/.idea | ||
/*.cache | ||
/_coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->exclude('var') | ||
; | ||
|
||
$config = new PhpCsFixer\Config(); | ||
$config->setRules([ | ||
'@Symfony' => true, | ||
'@PHP70Migration' => true, | ||
'@PHP71Migration' => true, | ||
'@PHP73Migration' => true, | ||
'@PHP74Migration' => true, | ||
'@PHP80Migration' => true, | ||
'@PHP81Migration' => true, | ||
'@DoctrineAnnotation' => true, | ||
'doctrine_annotation_array_assignment' => ['operator' => '='], | ||
'yoda_style' => false, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'declare_strict_types' => true, | ||
'method_argument_space' => ['on_multiline' => 'ignore'], | ||
'phpdoc_to_comment' => false, | ||
'single_line_throw' => false, | ||
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true], | ||
]) | ||
->setRiskyAllowed(true) | ||
->setFinder($finder); | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": [ | ||
"config:base", | ||
"group:allNonMajor", | ||
"schedule:weekends", | ||
":automergePatch" | ||
], | ||
"ignorePresets": [":prHourlyLimit2"], | ||
"rangeStrategy": "update-lockfile", | ||
"lockFileMaintenance": { | ||
"enabled": true | ||
}, | ||
"constraintsFiltering": "strict", | ||
"packageRules": [ | ||
{ | ||
"matchPackageNames": ["api-platform/core"], | ||
"allowedVersions": "<4" | ||
} | ||
] | ||
} |
Oops, something went wrong.