-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 4b2ae16
Showing
67 changed files
with
8,478 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,13 @@ | ||
*.php text eol=lf | ||
|
||
/.github/ export-ignore | ||
/docs/ export-ignore | ||
/tests/ export-ignore | ||
|
||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.php-cs-fixer.dist.php export-ignore | ||
/composer.lock export-ignore | ||
/infection.json.dist export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpunit.xml.dist export-ignore |
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 @@ | ||
github: [romm] |
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,47 @@ | ||
name: Mutation tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
jobs: | ||
mutation: | ||
name: Mutation tests | ||
runs-on: ubuntu-latest | ||
env: | ||
php-version: '8.2' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Needed for the `git diff` used below for Infection | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.php-version }} | ||
coverage: pcov | ||
|
||
- uses: "ramsey/composer-install@v2" | ||
|
||
- name: Creating var directory | ||
run: mkdir -p var/cache | ||
|
||
- name: Cache Mutation results | ||
uses: actions/cache@v3.2.5 | ||
with: | ||
path: var/cache | ||
key: mutation-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/mutation.yml') }} | ||
restore-keys: mutation-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/mutation.yml') }} | ||
|
||
- name: Running mutation tests | ||
if: github.ref == 'refs/heads/master' | ||
run: php vendor/bin/infection --threads=$(nproc) | ||
env: | ||
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | ||
|
||
- name: Running mutation tests | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
git fetch --depth=1 origin $GITHUB_BASE_REF | ||
php vendor/bin/infection --threads=$(nproc) --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered |
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,50 @@ | ||
name: Coding Standards & Static Analysis | ||
on: [push, pull_request] | ||
jobs: | ||
qa: | ||
name: Quality Assurance | ||
runs-on: ubuntu-latest | ||
env: | ||
php-version: '8.2' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.php-version }} | ||
coverage: none # Xdebug is installed by default, so we remove it manually | ||
|
||
- name: Creating var directory | ||
run: mkdir -p var/cache | ||
|
||
- name: Cache QA results | ||
uses: actions/cache@v3.2.5 | ||
with: | ||
path: var/cache | ||
key: qa-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/quality-assurance.yml') }} | ||
restore-keys: qa-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/quality-assurance.yml') }} | ||
|
||
- name: Checking Composer | ||
run: composer validate --strict | ||
|
||
- uses: "ramsey/composer-install@v2" | ||
|
||
- name: Checking for forgotten TODO | ||
run: composer check-todo | ||
|
||
- name: Warming up cache | ||
run: php tests/App/bin/console cache:warmup --env=test | ||
|
||
- name: TODO TMP | ||
run: | | ||
pwd | ||
ls -al var/cache/test | ||
ls -al var/cache/test/default | ||
- name: Running PHPStan | ||
run: php vendor/bin/phpstan | ||
|
||
- name: Running PHP Coding Standards Fixer | ||
run: php vendor/bin/php-cs-fixer fix --dry-run |
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,33 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
jobs: | ||
tests: | ||
name: PHP ${{ matrix.php-version }} / ${{ matrix.dependencies }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
dependencies: | ||
- "lowest" | ||
- "highest" | ||
- "locked" | ||
php-version: | ||
- "8.1" | ||
- "8.2" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none # Xdebug is installed by default, so we remove it manually | ||
|
||
- uses: "ramsey/composer-install@v2" | ||
with: | ||
dependency-versions: ${{ matrix.dependencies }} | ||
|
||
- name: Running tests | ||
run: php vendor/bin/phpunit |
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,5 @@ | ||
.idea | ||
var | ||
vendor | ||
phpstan.neon | ||
.phpunit.result.cache |
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,22 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create()->in([ | ||
'./src', | ||
'./tests', | ||
]); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setFinder($finder) | ||
->setCacheFile('var/cache/.php_cs.cache') | ||
->setRules([ | ||
'@PSR1' => true, | ||
'@PSR12' => true, | ||
'no_unused_imports' => true, | ||
'no_extra_blank_lines' => true, | ||
'no_empty_phpdoc' => true, | ||
'single_line_empty_body' => true, | ||
'no_superfluous_phpdoc_tags' => [ | ||
'allow_mixed' => true, | ||
'remove_inheritdoc' => true, | ||
], | ||
]); |
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,18 @@ | ||
Copyright (c) Romain Canon | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.