|
6 | 6 | test-php:
|
7 | 7 | name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
|
8 | 8 | runs-on: ${{ matrix.os }}
|
| 9 | + continue-on-error: ${{ matrix.experimental }} |
9 | 10 | strategy:
|
10 | 11 | matrix:
|
11 |
| - php-version: ["7.1", "7.2", "7.3", "7.4", "8.0"] |
| 12 | + php-version: ["7.2", "7.3", "7.4", "8.0"] |
12 | 13 | os: [ubuntu-latest]
|
| 14 | + experimental: [false] |
| 15 | + composer-options: [''] |
| 16 | + include: |
| 17 | + - { php-version: '8.1', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-reqs' } |
13 | 18 | steps:
|
14 | 19 | - uses: actions/checkout@v2
|
15 | 20 | - name: Use php ${{ matrix.php-version }}
|
16 | 21 | uses: shivammathur/setup-php@v2
|
17 | 22 | with:
|
18 | 23 | php-version: ${{ matrix.php-version }}
|
19 |
| - extensions: posix, mbstring |
20 |
| - coverage: xdebug |
21 |
| - tools: composer:v2 |
22 |
| - - name: Cache module |
| 24 | + coverage: pcov |
| 25 | + - name: Get Composer Cache Directory |
| 26 | + id: composer-cache |
| 27 | + run: | |
| 28 | + echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 29 | + - name: Restore cache |
23 | 30 | uses: actions/cache@v2
|
24 | 31 | with:
|
25 |
| - path: ~/.composer/cache/ |
26 |
| - key: composer-cache |
| 32 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 33 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 34 | + restore-keys: | |
| 35 | + ${{ runner.os }}-composer- |
27 | 36 | - name: Install dependencies
|
28 |
| - if: ${{ matrix.php-version != '8.0' }} |
29 |
| - run: composer install --no-interaction --prefer-dist --no-progress --no-suggest |
30 |
| - - name: Install dependencies for php 8.0 |
31 |
| - if: ${{ matrix.php-version == '8.0' }} |
32 |
| - run: composer install --no-interaction --prefer-dist --no-progress --no-suggest --ignore-platform-reqs |
| 37 | + run: composer install --no-interaction ${{ matrix.composer-options }} |
33 | 38 | - name: Run php tests
|
34 | 39 | run: composer run phpunit
|
35 | 40 | - name: Send coverage
|
|
0 commit comments