-
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
1 parent
b7e23b9
commit bf5bffc
Showing
13 changed files
with
250 additions
and
167 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
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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
* text=auto | ||
|
||
/.github export-ignore | ||
|
||
/tests export-ignore | ||
phpunit.xml export-ignore | ||
* text=auto eol=lf | ||
*.pp eol=lf linguist-language=EBNF | ||
*.pp2 eol=lf linguist-language=EBNF | ||
|
||
.editorconfig export-ignore | ||
.php-cs-fixer.php export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
|
||
phpunit.xml export-ignore | ||
psalm.xml export-ignore | ||
rector.php export-ignore | ||
|
||
/.github export-ignore | ||
/example export-ignore | ||
/tests 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,36 @@ | ||
name: codestyle | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
psalm: | ||
name: Code Style | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '8.3' ] | ||
os: [ ubuntu-latest ] | ||
steps: | ||
- name: Set Git To Use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/checkout@v3.3.0 | ||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
- name: Validate Composer | ||
run: composer validate | ||
- name: Install Dependencies | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer update --prefer-dist --no-interaction --no-progress | ||
- name: Check Code Style | ||
run: composer phpcs:check |
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 |
---|---|---|
@@ -1,126 +1,39 @@ | ||
name: build | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
security: | ||
name: Security | ||
tests: | ||
name: Unit Tests (${{matrix.php}}-${{matrix.ts}}, ${{ matrix.os }}, ${{ matrix.stability }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '8.1' ] | ||
os: [ ubuntu-latest ] | ||
steps: | ||
- name: Set Git To Use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
- name: Install Dependencies | ||
uses: nick-invision/retry@v1 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer update --prefer-dist --no-interaction --no-progress | ||
- name: Security Advisories | ||
run: composer require --dev roave/security-advisories:dev-latest | ||
|
||
static-analysis: | ||
name: Psalm | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '8.1' ] | ||
os: [ ubuntu-latest ] | ||
|
||
steps: | ||
- name: Set Git To Use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
|
||
- name: Install Dependencies | ||
uses: nick-invision/retry@v1 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Static Analysis | ||
continue-on-error: true | ||
run: vendor/bin/psalm --no-cache | ||
|
||
coding-standards: | ||
name: Coding Standards | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '8.1' ] | ||
os: [ ubuntu-latest ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
|
||
- name: Install Dependencies | ||
uses: nick-invision/retry@v1 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Check Coding Standards | ||
run: vendor/bin/phpcs --standard=phpcs.xml | ||
|
||
test: | ||
name: Build (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.4', '8.0', '8.1', '8.2' ] | ||
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] | ||
ts: [ 'ts', 'nts' ] | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
stability: [ prefer-lowest, prefer-stable ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
uses: actions/checkout@v3.3.0 | ||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
|
||
ini-values: ffi.enable=1 | ||
extensions: ffi | ||
env: | ||
phpts: ${{ matrix.ts }} | ||
- name: Validate Composer | ||
run: composer validate | ||
- name: Install Dependencies | ||
uses: nick-invision/retry@v1 | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer update --${{ matrix.stability }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress | ||
|
||
command: composer update --prefer-dist --no-interaction --no-progress | ||
- name: Execute Tests | ||
run: vendor/bin/phpunit | ||
run: composer test |
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,40 @@ | ||
name: security | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
security: | ||
name: Security | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '8.3' ] | ||
os: [ ubuntu-latest ] | ||
steps: | ||
- name: Set Git To Use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/checkout@v3.3.0 | ||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
- name: Validate Composer | ||
run: composer validate | ||
- name: Install Dependencies | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer update --prefer-dist --no-interaction --no-progress | ||
- name: Composer Audit | ||
run: composer audit | ||
- name: Security Advisories | ||
run: composer require --dev roave/security-advisories:dev-latest |
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,36 @@ | ||
name: static-analysis | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
psalm: | ||
name: Psalm | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '8.3' ] | ||
os: [ ubuntu-latest ] | ||
steps: | ||
- name: Set Git To Use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/checkout@v3.3.0 | ||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
- name: Validate Composer | ||
run: composer validate | ||
- name: Install Dependencies | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer update --prefer-dist --no-interaction --no-progress | ||
- name: Static Analysis | ||
run: composer linter |
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
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,28 @@ | ||
includes: | ||
- phar://phpstan.phar/conf/bleedingEdge.neon | ||
- vendor/phpstan/phpstan-deprecation-rules/rules.neon | ||
- vendor/phpstan/phpstan-strict-rules/rules.neon | ||
parameters: | ||
level: max | ||
phpVersion: | ||
min: 70400 | ||
max: 80400 | ||
parallel: | ||
jobSize: 20 | ||
maximumNumberOfProcesses: 4 | ||
minimumNumberOfJobsPerProcess: 2 | ||
paths: | ||
- src | ||
tmpDir: vendor/.cache.phpstan | ||
rememberPossiblyImpureFunctionValues: false | ||
checkTooWideReturnTypesInProtectedAndPublicMethods: true | ||
checkImplicitMixed: true | ||
checkBenevolentUnionTypes: true | ||
reportPossiblyNonexistentGeneralArrayOffset: true | ||
reportPossiblyNonexistentConstantArrayOffset: true | ||
reportAlwaysTrueInLastCondition: true | ||
reportAnyTypeWideningInVarTag: true | ||
checkMissingOverrideMethodAttribute: false | ||
inferPrivatePropertyTypeFromConstructor: true | ||
tipsOfTheDay: false | ||
checkMissingCallableSignature: true |
Oops, something went wrong.