|
9 | 9 | test-php: |
10 | 10 | name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }} |
11 | 11 | runs-on: ${{ matrix.os }} |
| 12 | + continue-on-error: ${{ matrix.experimental }} |
12 | 13 | strategy: |
13 | 14 | fail-fast: false |
14 | 15 | matrix: |
15 | | - php-version: ["8.1", "8.2", "8.3"] |
| 16 | + php-version: ["8.1", "8.2", "8.3", "8.4"] |
16 | 17 | os: [ubuntu-latest] |
| 18 | + experimental: [false] |
| 19 | + coverage-required: [true] |
| 20 | + composer-options: [''] |
| 21 | + include: |
| 22 | + - { php-version: 'nightly', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-reqs' } |
17 | 23 | steps: |
18 | 24 | - uses: actions/checkout@v4 |
19 | 25 | - name: Use php ${{ matrix.php-version }} |
20 | 26 | uses: shivammathur/setup-php@v2 |
21 | 27 | with: |
22 | 28 | php-version: ${{ matrix.php-version }} |
23 | | - - name: Cache module |
24 | | - uses: actions/cache@v3 |
| 29 | + coverage: pcov |
| 30 | + - name: Get Composer Cache Directory |
| 31 | + id: composer-cache |
| 32 | + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT |
| 33 | + - name: Restore cache |
| 34 | + uses: actions/cache@v4 |
25 | 35 | with: |
26 | | - path: ~/.composer/cache/ |
27 | | - key: composer-cache |
| 36 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 37 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 38 | + restore-keys: | |
| 39 | + ${{ runner.os }}-composer- |
28 | 40 | - name: Install dependencies |
29 | | - run: composer install --no-interaction |
| 41 | + run: composer install --no-interaction ${{ matrix.composer-options }} |
30 | 42 | - name: Run php tests |
31 | 43 | run: composer run phpunit |
32 | 44 | - name: Send coverage |
33 | | - uses: codecov/codecov-action@v3 |
| 45 | + uses: codecov/codecov-action@v4 |
34 | 46 | with: |
35 | | - file: "./build/logs/clover.xml" |
| 47 | + fail_ci_if_error: ${{ matrix.coverage-required }} |
| 48 | + flags: php-${{ matrix.php-version }} |
| 49 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 50 | + file: ./build/logs/clover.xml |
0 commit comments