-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (32 loc) · 1.17 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.1, 8.0, 7.4, 7.3 ]
release: [ stable, lowest ]
include:
- php: 7.4
release: stable
coverage: xdebug
steps:
- uses: actions/checkout@v3
- 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 tokenizer, xml, zip
coverage: ${{ matrix.coverage }}
- run: composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-${{ matrix.release }}
- run: |
PHPUNIT_FLAGS=$([ "${{ matrix.coverage }}" == "xdebug" ] && echo "--coverage-clover=coverage.xml" || echo "")
vendor/bin/phpunit $PHPUNIT_FLAGS
- run: |
wget -q https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml
if: matrix.coverage == 'xdebug'