Merge pull request #45 from slc1/feature/as-command-annotations #44
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: Test | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }} | |
runs-on: ubuntu-20.04 | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
symfony-version: | |
- '5.4.*' | |
- '6.0.*' | |
- '7.0.*' | |
exclude: | |
- php-version: '8.1' | |
symfony-version: '7.0.*' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
ini-values: "memory_limit=-1" | |
php-version: ${{ matrix.php-version }} | |
tools: composer:v2, flex | |
- name: Validate composer.json | |
run: composer validate --no-check-lock | |
- name: Remove unused PHP-CS-Fixer | |
run: composer remove --dev --no-update friendsofphp/php-cs-fixer | |
if: matrix.php != '8.0' || matrix.symfony-version != '5.4.*' | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony-version }}" | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: PHP-CS-Fixer | |
run: vendor/bin/php-cs-fixer fix --dry-run --diff | |
if: matrix.php == '8.0' && matrix.symfony-version == '5.4.*' | |
- name: PHPUnit | |
run: vendor/bin/phpunit |