|
| 1 | +name: Test |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 3.x |
| 7 | + - master |
| 8 | + pull_request: |
| 9 | + |
| 10 | +env: |
| 11 | + ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + test: |
| 15 | + name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }} |
| 16 | + |
| 17 | + runs-on: ubuntu-latest |
| 18 | + |
| 19 | + continue-on-error: ${{ matrix.allowed-to-fail }} |
| 20 | + |
| 21 | + strategy: |
| 22 | + matrix: |
| 23 | + php-version: |
| 24 | + - '7.2' |
| 25 | + - '7.3' |
| 26 | + - '7.4' |
| 27 | + - '8.0' |
| 28 | + dependencies: [highest] |
| 29 | + allowed-to-fail: [false] |
| 30 | + variant: [normal] |
| 31 | + include: |
| 32 | + - php-version: '7.2' |
| 33 | + dependencies: lowest |
| 34 | + allowed-to-fail: false |
| 35 | + variant: 'vich/uploader-bundle' |
| 36 | + - php-version: '7.3' |
| 37 | + dependencies: highest |
| 38 | + allowed-to-fail: false |
| 39 | + variant: normal |
| 40 | + - php-version: '7.4' |
| 41 | + dependencies: highest |
| 42 | + allowed-to-fail: false |
| 43 | + variant: 'symfony/symfony:"4.4.*"' |
| 44 | + - php-version: '7.4' |
| 45 | + dependencies: highest |
| 46 | + allowed-to-fail: false |
| 47 | + variant: 'vich/uploader-bundle' |
| 48 | + - php-version: '8.0' |
| 49 | + dependencies: highest |
| 50 | + allowed-to-fail: true |
| 51 | + variant: normal |
| 52 | + |
| 53 | + steps: |
| 54 | + - name: Checkout |
| 55 | + uses: actions/checkout@v2 |
| 56 | + |
| 57 | + - name: Install PHP with extensions |
| 58 | + uses: shivammathur/setup-php@v2 |
| 59 | + with: |
| 60 | + php-version: ${{ matrix.php-version }} |
| 61 | + coverage: pcov |
| 62 | + tools: composer:v2 |
| 63 | + |
| 64 | + - name: Add PHPUnit matcher |
| 65 | + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 66 | + |
| 67 | + - name: Configuration required for PHP 8.0 |
| 68 | + if: matrix.php-version == '8.0' |
| 69 | + run: composer config platform.php 7.4.99 |
| 70 | + |
| 71 | + - name: Install variant |
| 72 | + if: matrix.variant != 'normal' |
| 73 | + run: composer require ${{ matrix.variant }} --no-update |
| 74 | + |
| 75 | + - name: "Install Composer dependencies (${{ matrix.dependencies }})" |
| 76 | + uses: "ramsey/composer-install@v1" |
| 77 | + with: |
| 78 | + dependency-versions: "${{ matrix.dependencies }}" |
| 79 | + composer-options: "--prefer-dist --prefer-stable" |
| 80 | + |
| 81 | + - name: Run Tests with "vich/uploader-bundle" |
| 82 | + if: matrix.variant == 'vich/uploader-bundle' |
| 83 | + run: make test_with_vichuploaderbundle |
| 84 | + |
| 85 | + - name: Run Tests |
| 86 | + if: matrix.variant != 'vich/uploader-bundle' |
| 87 | + run: make test |
0 commit comments