|
| 1 | +name: Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +jobs: |
| 8 | + tests: |
| 9 | + name: PHP ${{ matrix.php }}; Symfony ${{ matrix.laravel }} |
| 10 | + runs-on: ubuntu-20.04 |
| 11 | + |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] |
| 15 | + symfony: ['3', '4', '5'] |
| 16 | + exclude: |
| 17 | + - php: '5.6' |
| 18 | + symfony: '4' |
| 19 | + - php: '5.6' |
| 20 | + symfony: '5' |
| 21 | + - php: '7.0' |
| 22 | + symfony: '4' |
| 23 | + - php: '7.0' |
| 24 | + symfony: '5' |
| 25 | + - php: '7.1' |
| 26 | + symfony: '5' |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Checkout Code |
| 30 | + uses: actions/checkout@v2 |
| 31 | + |
| 32 | + - name: Setup PHP |
| 33 | + uses: shivammathur/setup-php@v2 |
| 34 | + with: |
| 35 | + php-version: ${{ matrix.php }} |
| 36 | + tools: composer:v2 |
| 37 | + coverage: none |
| 38 | + |
| 39 | + - name: Setup Problem Matchers |
| 40 | + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 41 | + |
| 42 | + - name: Select Symfony 3 |
| 43 | + uses: nick-invision/retry@v1 |
| 44 | + with: |
| 45 | + timeout_minutes: 5 |
| 46 | + max_attempts: 5 |
| 47 | + command: composer require "symfony/process:^3.4" --no-update --no-interaction |
| 48 | + if: "matrix.symfony == '3'" |
| 49 | + |
| 50 | + - name: Select Symfony 4 |
| 51 | + uses: nick-invision/retry@v1 |
| 52 | + with: |
| 53 | + timeout_minutes: 5 |
| 54 | + max_attempts: 5 |
| 55 | + command: composer require "symfony/process:^4.4" --no-update --no-interaction |
| 56 | + if: "matrix.symfony == '4'" |
| 57 | + |
| 58 | + - name: Select Symfony 5 |
| 59 | + uses: nick-invision/retry@v1 |
| 60 | + with: |
| 61 | + timeout_minutes: 5 |
| 62 | + max_attempts: 5 |
| 63 | + command: composer require "symfony/process:^5.2" --no-update --no-interaction |
| 64 | + if: "matrix.symfony == '5'" |
| 65 | + |
| 66 | + - name: Install PHP Dependencies |
| 67 | + uses: nick-invision/retry@v1 |
| 68 | + with: |
| 69 | + timeout_minutes: 5 |
| 70 | + max_attempts: 5 |
| 71 | + command: composer update --no-interaction --no-progress |
| 72 | + |
| 73 | + - name: Execute PHPUnit |
| 74 | + run: vendor/bin/phpunit |
0 commit comments