remove minimum-stability dev requirement (#189) #77
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
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: | |
- "8.1" | |
- "8.2" | |
dependencies: | |
- "lowest" | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GHUB_TOKEN }} | |
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" | |
- name: "Install highest dependencies" | |
if: ${{ matrix.dependencies == 'highest' }} | |
run: "composer update --no-interaction --no-progress" | |
- 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.2" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GHUB_TOKEN }} | |
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" | |
- name: "Execute Psalm" | |
run: "vendor/bin/psalm --output-format=github --shepherd --stats" | |
stan: | |
name: "PhpStan" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
operating-system: | |
- "ubuntu-latest" | |
php-version: | |
- "8.2" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GHUB_TOKEN }} | |
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" | |
- name: "Execute PhpStan" | |
run: "vendor/bin/phpstan analyse --memory-limit=-1" | |
code-style: | |
name: "Code style" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
operating-system: | |
- "ubuntu-latest" | |
php-version: | |
- "8.2" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GHUB_TOKEN }} | |
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" | |
- name: "Execute PhpCs" | |
run: "vendor/bin/phpcs --config-set php_version 7040 && vendor/bin/phpcs -q --report=checkstyle | cs2pr" | |
coverage: | |
name: "Code coverage" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
operating-system: | |
- "ubuntu-latest" | |
php-version: | |
- "8.2" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GHUB_TOKEN }} | |
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" | |
- 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.7.0/php-coveralls.phar | |
php php-coveralls.phar --verbose | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
mutation: | |
name: "Mutation testing" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
operating-system: | |
- "ubuntu-latest" | |
php-version: | |
- "8.2" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GHUB_TOKEN }} | |
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" | |
- name: "Infection" | |
run: "vendor/bin/roave-infection-static-analysis-plugin --only-covered --test-framework-options=\"--testsuite=unit\"" | |
env: | |
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
security: | |
name: "Security check" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
operating-system: | |
- "ubuntu-latest" | |
php-version: | |
- "8.2" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GHUB_TOKEN }} | |
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" | |
- name: "Execute security check" | |
run: "composer get-security && composer security" |