update readme #52
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: Tests | |
on: [push, pull_request] | |
jobs: | |
php: | |
name: PHP ${{ matrix.php-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: | |
- '7.0' | |
- '7.1' | |
- '7.2' | |
- '7.3' | |
- '7.4' | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
- '8.4' | |
include: | |
- php-versions: '7.0' | |
composer-flags: '--prefer-lowest' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- uses: ramsey/composer-install@v2 | |
with: | |
composer-options: ${{ matrix.composer-flags }} | |
- name: Run Tests | |
run: vendor/bin/simple-phpunit --coverage-clover coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
- name: Run mutation tests | |
if: ${{ matrix.php-versions == 7.4 }} | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
run: | | |
composer config --no-plugins allow-plugins.infection/extension-installer true | |
composer req infection/infection | |
vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=100 --min-msi=100 -s -j4 | |
- name: Run phpstan | |
if: ${{ matrix.php-versions >= 7.1 }} | |
run: | | |
composer req phpstan/phpstan | |
vendor/bin/phpstan analyse src -l 6 |