-
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.
Added support for php 8.1 and thecodingmachine/safe v2 (#16)
* Added support for php 8.1 and thecodingmachine/safe v2 * Add readonly keyword, fix ci * Go for major version bump
- Loading branch information
Showing
15 changed files
with
230 additions
and
317 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,185 @@ | ||
name: "CI" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
env: | ||
PHP_EXTENSIONS: "dom, mbstring, xml" | ||
PHP_INI_VALUES: "memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On" | ||
jobs: | ||
unit: | ||
name: "Unit tests ${{matrix.php-version}}-${{matrix.operating-system}}-${{matrix.dependencies}}" | ||
runs-on: ${{matrix.operating-system}} | ||
strategy: | ||
matrix: | ||
operating-system: | ||
- "ubuntu-latest" | ||
- "windows-latest" | ||
php-version: | ||
- "7.3" | ||
- "7.4" | ||
- "8.0" | ||
- "8.1" | ||
dependencies: | ||
- "lowest" | ||
- "highest" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{matrix.php-version}}" | ||
extensions: "${{env.PHP_EXTENSIONS}}" | ||
ini-values: "${{env.PHP_INI_VALUES}}" | ||
tools: "composer:v2" | ||
- name: "Update composer" | ||
run: "composer self-update" | ||
- name: "Install lowest dependencies" | ||
if: ${{ matrix.dependencies == 'lowest' }} | ||
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" | ||
- name: "Install highest dependencies" | ||
if: ${{ matrix.dependencies == 'highest' }} | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
- name: "Execute tests" | ||
run: "vendor/bin/phpunit --fail-on-warning" | ||
psalm: | ||
name: "Psalm" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
operating-system: | ||
- "ubuntu-latest" | ||
php-version: | ||
- "8.1" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{matrix.php-version}}" | ||
extensions: "${{env.PHP_EXTENSIONS}}" | ||
ini-values: "${{env.PHP_INI_VALUES}}" | ||
tools: "composer:v2" | ||
- name: "Update composer" | ||
run: "composer self-update" | ||
- name: "Install highest dependencies" | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
- name: "Execute Psalm" | ||
run: "vendor/bin/psalm" | ||
stan: | ||
name: "PhpStan" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
operating-system: | ||
- "ubuntu-latest" | ||
php-version: | ||
- "8.1" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{matrix.php-version}}" | ||
extensions: "${{env.PHP_EXTENSIONS}}" | ||
ini-values: "${{env.PHP_INI_VALUES}}" | ||
tools: "composer:v2" | ||
- name: "Update composer" | ||
run: "composer self-update" | ||
- name: "Install highest dependencies" | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
- name: "Execute PhpStan" | ||
run: "composer stan" | ||
code-style: | ||
name: "Code style" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
operating-system: | ||
- "ubuntu-latest" | ||
php-version: | ||
- "8.1" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{matrix.php-version}}" | ||
extensions: "${{env.PHP_EXTENSIONS}}" | ||
ini-values: "${{env.PHP_INI_VALUES}}" | ||
tools: "composer:v2, cs2pr" | ||
- name: "Update composer" | ||
run: "composer self-update" | ||
- name: "Install highest dependencies" | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
- name: "Execute PhpCs" | ||
run: "vendor/bin/phpcs -q --report=checkstyle | cs2pr" | ||
mutation: | ||
name: "Mutation" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
operating-system: | ||
- "ubuntu-latest" | ||
php-version: | ||
- "8.1" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{matrix.php-version}}" | ||
extensions: "${{env.PHP_EXTENSIONS}}" | ||
ini-values: "${{env.PHP_INI_VALUES}}" | ||
tools: "composer:v2" | ||
- name: "Update composer" | ||
run: "composer self-update" | ||
- name: "Install highest dependencies" | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
- name: "Execute PhpCs" | ||
run: "vendor/bin/infection" | ||
env: | ||
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | ||
coverage: | ||
name: "Mutation" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
operating-system: | ||
- "ubuntu-latest" | ||
php-version: | ||
- "8.1" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{matrix.php-version}}" | ||
extensions: "${{env.PHP_EXTENSIONS}}" | ||
ini-values: "${{env.PHP_INI_VALUES}}" | ||
tools: "composer:v2" | ||
- name: "Update composer" | ||
run: "composer self-update" | ||
- name: "Install highest dependencies" | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
- name: "Code coverage" | ||
run: | | ||
vendor/bin/phpunit --testsuite=unit,functional --coverage-clover build/logs/clover.xml | ||
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar | ||
php php-coveralls.phar --verbose | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.