|
4 | 4 | PHP:
|
5 | 5 | strategy:
|
6 | 6 | matrix:
|
7 |
| - image: [ |
8 |
| - 'srcoder/development-php:php81-fpm', |
9 |
| - 'srcoder/development-php:php82-fpm' |
10 |
| - ] |
| 7 | + php-version: [8.1, 8.2, 8.3, 8.4] |
11 | 8 | runs-on: ubuntu-latest
|
12 | 9 | container:
|
13 |
| - image: ${{ matrix.image }} |
| 10 | + image: ${{ matrix.php-version == '8.1' && 'srcoder/development-php:php81-fpm' || |
| 11 | + matrix.php-version == '8.2' && 'srcoder/development-php:php82-fpm' || |
| 12 | + matrix.php-version == '8.3' && 'srcoder/development-php:php83-fpm' || |
| 13 | + 'srcoder/development-php:php84-fpm' }} |
14 | 14 | steps:
|
15 | 15 | - name: Checkout
|
16 | 16 | uses: actions/checkout@v2
|
17 |
| - - name: Testing Suite |
18 |
| - # We are purposefully skipping the phpunit task since it is written for phpunit ^12 and php >= 8.3 |
| 17 | + |
| 18 | + - name: Install Dependencies |
19 | 19 | run: |
|
20 | 20 | composer2 install --dev --prefer-dist --no-scripts --no-progress --optimize-autoloader --no-interaction -vvv
|
21 | 21 | composer2 show
|
22 |
| - composer2 exec -v grumphp -- run --tasks=composer,jsonlint,xmllint,yamllint,phpcs,phplint,phpmd,phpstan,securitychecker_enlightn |
23 | 22 | shell: bash
|
24 |
| - PHPWithUnitTests: |
25 |
| - runs-on: ubuntu-latest |
26 |
| - container: |
27 |
| - image: 'srcoder/development-php:php83-fpm' |
28 |
| - steps: |
29 |
| - - name: Checkout |
30 |
| - uses: actions/checkout@v2 |
31 |
| - - name: Testing Suite |
| 23 | + |
| 24 | + - name: Run GrumPHP Tasks |
32 | 25 | run: |
|
33 |
| - composer2 install --dev --prefer-dist --no-scripts --no-progress --optimize-autoloader --no-interaction -vvv |
34 |
| - composer2 show |
35 |
| - composer2 exec -v grumphp -- run --tasks=composer,jsonlint,xmllint,yamllint,phpcs,phplint,phpmd,phpstan,phpunit,securitychecker_enlightn |
| 26 | + if [[ "${{ matrix.php-version }}" == "8.1" || "${{ matrix.php-version }}" == "8.2" ]]; then |
| 27 | + composer2 exec -v grumphp -- run --tasks=composer,jsonlint,xmllint,yamllint,phpcs,phplint,phpmd,phpstan,securitychecker_enlightn |
| 28 | + else |
| 29 | + composer2 exec -v grumphp -- run |
| 30 | + fi |
36 | 31 | shell: bash
|
0 commit comments