-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (41 loc) · 1.19 KB
/
php.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
name: PHP
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 8.1
composer: '--prefer-lowest'
desc: "Lowest versions"
- php: 8.1
- php: 8.2
coverage: '--coverage-clover /tmp/clover.xml'
- php: 8.3
name: PHP ${{ matrix.php }} ${{ matrix.desc }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer update --prefer-dist --no-progress ${{ matrix.composer }}
- name: Run PHPUnit
run: vendor/bin/phpunit ${{ matrix.coverage }}
- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
if: ${{ matrix.coverage }}
with:
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"