-
Notifications
You must be signed in to change notification settings - Fork 34
72 lines (63 loc) · 2.23 KB
/
ci.yaml
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
64
65
66
67
68
69
70
71
72
name: CI
on: [push, pull_request]
jobs:
run-tests:
name: Tests with PHP ${{ matrix.php-version }} (Composer ${{ matrix.dependencies }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php-version: 7.4
dependencies: "--prefer-stable"
test_coverage: "no"
- php-version: 7.4
dependencies: "--prefer-lowest --prefer-stable"
test_coverage: "no"
- php-version: 8.0
dependencies: "--prefer-stable"
test_coverage: "no"
- php-version: 8.0
dependencies: "--prefer-lowest --prefer-stable"
test_coverage: "no"
- php-version: 8.1
dependencies: "--prefer-stable"
test_coverage: "no"
- php-version: 8.1
dependencies: "--prefer-lowest --prefer-stable"
test_coverage: "no"
- php-version: 8.2
dependencies: "--prefer-stable"
test_coverage: "no"
- php-version: 8.2
dependencies: "--prefer-lowest --prefer-stable"
test_coverage: "no"
- php-version: 8.3
dependencies: "--prefer-stable"
test_coverage: "no"
- php-version: 8.3
dependencies: "--prefer-lowest --prefer-stable"
test_coverage: "no"
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: xdebug
tools: composer:2.4.4
- name: Checkout
uses: actions/checkout@v3
- name: Install composer dependencies
run: composer update --prefer-source ${{ matrix.dependencies }}
- name: Run php-cs-fixer
run: composer cs-check
env:
PHP_CS_FIXER_IGNORE_ENV: true
- name: Run tests (without coverage)
if: ${{ matrix.test_coverage == 'no' }}
run: composer test
- name: Run tests (with coverage)
if: ${{ matrix.test_coverage == 'yes' }}
run: php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml
- name: Run coveralls
if: ${{ matrix.test_coverage == 'yes' }}
run: vendor/bin/php-coveralls