-
-
Notifications
You must be signed in to change notification settings - Fork 132
63 lines (51 loc) · 1.62 KB
/
coverage.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Coverage
on:
push:
branches: [ 'master', '2.x', '3.x' ]
pull_request:
branches: [ '*' ]
jobs:
coverage:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.3']
setup: ['stable']
name: PHP ${{ matrix.php }} - ${{ matrix.setup }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json
tools: composer:v2
coverage: xdebug
- name: Imagick SVG support
run: sudo apt-get install libmagickcore-6.q16-3-extra
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-coverage-${{ matrix.php }}-${{ matrix.setup }}-${{ hashFiles('composer.json') }}
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: |
composer require scrutinizer/ocular --no-update --no-interaction --dev
composer update --prefer-dist --no-progress --prefer-${{ matrix.setup }}
- name: Coverage
run: vendor/bin/paratest --coverage-clover=coverage.xml --coverage-text --coverage-html=coverage
env:
XDEBUG_MODE: coverage
- name: Archive Code Coverage Results
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload Code Coverage To Scrutinizer
run: vendor/bin/ocular code-coverage:upload --format=php-clover coverage.xml