-
-
Notifications
You must be signed in to change notification settings - Fork 92
36 lines (32 loc) · 1.1 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: CI
on: [ push, pull_request ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.3, 8.2, 8.1 ]
release: [ stable, lowest ]
include:
- php: 8.3
release: stable
coverage: xdebug
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bcmath, ctype, json, mbstring, openssl, pdo, pdo_sqlite, tokenizer, xml
coverage: ${{ matrix.coverage }}
- run: composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }}
- run: |
PHPUNIT_FLAGS=$([ "${{ matrix.coverage }}" == "xdebug" ] && echo "--coverage-clover=coverage.xml" || echo "")
vendor/bin/phpunit $PHPUNIT_FLAGS
- run: php tests/coverage/scrutinizer.php
if: matrix.coverage == 'xdebug'