Test against all Symfony minor versions from 6.0 to 8.0 #9
This file contains hidden or 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: "build" | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| pull_request: ~ | |
| workflow_dispatch: ~ | |
| jobs: | |
| coding-standards: | |
| name: "Coding Standards" | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.2" | |
| dependencies: | |
| - "highest" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| - name: "Setup PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| coverage: "none" | |
| - name: "Install composer dependencies" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| dependency-versions: "${{ matrix.dependencies }}" | |
| - name: "Validate composer" | |
| run: "composer validate --strict" | |
| - name: "Check composer normalized" | |
| run: "composer normalize --dry-run" | |
| dependency-analysis: | |
| name: "Dependency Analysis" | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| dependencies: | |
| - "highest" | |
| symfony: | |
| - "~6.0.0" | |
| - "~6.1.0" | |
| - "~6.2.0" | |
| - "~6.3.0" | |
| - "~6.4.0" | |
| - "~7.0.0" | |
| - "~7.1.0" | |
| - "~7.2.0" | |
| - "~7.3.0" | |
| - "~7.4.0" | |
| - "~8.0.0" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| - name: "Setup PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| coverage: "none" | |
| tools: "composer-dependency-analyser, flex" | |
| - name: "Remove require-dev section" | |
| run: "composer config --unset require-dev" | |
| - name: "Install composer dependencies" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| dependency-versions: "${{ matrix.dependencies }}" | |
| env: | |
| SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
| - name: "Run dependency analysis" | |
| run: "composer-dependency-analyser" | |
| static-code-analysis: | |
| name: "Static Code Analysis" | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| dependencies: | |
| - "lowest" | |
| - "highest" | |
| symfony: | |
| - "~6.0.0" | |
| - "~6.1.0" | |
| - "~6.2.0" | |
| - "~6.3.0" | |
| - "~6.4.0" | |
| - "~7.0.0" | |
| - "~7.1.0" | |
| - "~7.2.0" | |
| - "~7.3.0" | |
| - "~7.4.0" | |
| - "~8.0.0" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| - name: "Setup PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| coverage: "none" | |
| tools: "flex" | |
| - name: "Install composer dependencies" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| dependency-versions: "${{ matrix.dependencies }}" | |
| env: | |
| SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
| - name: "Static analysis" | |
| run: "vendor/bin/phpstan" | |
| unit-tests: | |
| name: "Unit tests" | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| dependencies: | |
| - "lowest" | |
| - "highest" | |
| symfony: | |
| - "~6.0.0" | |
| - "~6.1.0" | |
| - "~6.2.0" | |
| - "~6.3.0" | |
| - "~6.4.0" | |
| - "~7.0.0" | |
| - "~7.1.0" | |
| - "~7.2.0" | |
| - "~7.3.0" | |
| - "~7.4.0" | |
| - "~8.0.0" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| - name: "Setup PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| coverage: "none" | |
| tools: "flex" | |
| - name: "Install composer dependencies" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| dependency-versions: "${{ matrix.dependencies }}" | |
| env: | |
| SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
| - name: "Run phpunit" | |
| run: "vendor/bin/phpunit" | |
| code-coverage: | |
| name: "Code Coverage" | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.4" | |
| dependencies: | |
| - "highest" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| - name: "Setup PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| coverage: "pcov" | |
| - name: "Install composer dependencies" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| dependency-versions: "${{ matrix.dependencies }}" | |
| - name: "Collect code coverage with pcov and phpunit/phpunit" | |
| run: "vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml" | |
| - name: "Send code coverage report to Codecov.io" | |
| uses: "codecov/codecov-action@v5" | |
| with: | |
| token: "${{ secrets.CODECOV_TOKEN }}" |