-
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.
Update code style to use PHP 8.0 features (#2)
* Update code style for PHP 8.0 * Add mutation testing * Add psalm static type checks * Remove unsupported features Raises types to psalm level 2 * Raise psalm level to 1 and totally typed * Add more tests to squash mutations * For now reduce required minCoverageMsi
- Loading branch information
Showing
24 changed files
with
4,297 additions
and
1,591 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,61 @@ | ||
name: "Mutation tests" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
mutation-tests: | ||
name: "Mutation tests" | ||
|
||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
matrix: | ||
dependencies: | ||
- "locked" | ||
php-version: | ||
- "8.0" | ||
operating-system: | ||
- "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: memory_limit=-1 | ||
tools: composer:v2, cs2pr | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
|
||
- name: "Install lowest dependencies" | ||
if: ${{ matrix.dependencies == 'lowest' }} | ||
run: "composer update --prefer-lowest --no-interaction --no-progress" | ||
|
||
- name: "Install highest dependencies" | ||
if: ${{ matrix.dependencies == 'highest' }} | ||
run: "composer update --no-interaction --no-progress" | ||
|
||
- name: "Install locked dependencies" | ||
if: ${{ matrix.dependencies == 'locked' }} | ||
run: "composer install --no-interaction --no-progress" | ||
|
||
- name: "Checkout current HEAD as a named ref" | ||
run: "git checkout -b ci-run-branch" | ||
|
||
- name: "Infection" | ||
run: "vendor/bin/infection" |
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,56 @@ | ||
name: "Static Analysis by Psalm" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
static-analysis-psalm: | ||
name: "Static Analysis by Psalm" | ||
|
||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
matrix: | ||
dependencies: | ||
- "locked" | ||
php-version: | ||
- "8.0" | ||
operating-system: | ||
- "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: memory_limit=-1 | ||
tools: composer:v2, cs2pr | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
|
||
- name: "Install lowest dependencies" | ||
if: ${{ matrix.dependencies == 'lowest' }} | ||
run: "composer update --prefer-lowest --no-interaction --no-progress" | ||
|
||
- name: "Install highest dependencies" | ||
if: ${{ matrix.dependencies == 'highest' }} | ||
run: "composer update --no-interaction --no-progress" | ||
|
||
- name: "Install locked dependencies" | ||
if: ${{ matrix.dependencies == 'locked' }} | ||
run: "composer install --no-interaction --no-progress" | ||
|
||
- name: "psalm" | ||
run: "vendor/bin/psalm --output-format=github --shepherd --stats" |
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
Oops, something went wrong.