Skip to content

Merge pull request #29 from IonBazan/feature/symfony-7 #246

Merge pull request #29 from IonBazan/feature/symfony-7

Merge pull request #29 from IonBazan/feature/symfony-7 #246

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
php:
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} Composer ${{ matrix.composer }} (${{ matrix.dependencies }})
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
composer: [v2]
dependencies: [highest]
php-versions:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
include:
- php-versions: '5.3'
dependencies: 'lowest'
composer: v1 # Global composer should be in same version as locally installed one
operating-system: ubuntu-latest
- php-versions: '7.0'
dependencies: 'lowest'
composer: v1
operating-system: ubuntu-latest
- php-versions: '8.2'
composer: v2
operating-system: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: json
coverage: xdebug
tools: composer:${{ matrix.composer }}
- name: Install Composer dependencies (${{ matrix.dependencies }})
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Set default branch for tests
run: git config --global init.defaultBranch main
- name: Run Tests
run: vendor/bin/simple-phpunit --coverage-clover coverage.xml --coverage-text
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Run mutation tests
if: ${{ matrix.php-versions == 8.3 && matrix.operating-system == 'ubuntu-latest' }}
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 -W
vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=100 --min-msi=100 -s -j4
- name: Run phpstan
if: ${{ matrix.php-versions == 8.3 && matrix.operating-system == 'ubuntu-latest' }}
run: |
composer req phpstan/phpstan
vendor/bin/phpstan