-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.33 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: CI
on:
push:
branches:
- '2.x'
pull_request:
branches:
- '*'
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
testsuite:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.3']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
ini-values: zend.assertions = 1
coverage: pcov
- name: Composer install
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: "${{ matrix.composer-options }}"
- name: Run PHPUnit
env:
XDEBUG_MODE: coverage
run: |
if [[ '${{ matrix.php-version }}' == '8.1' ]]; then
export CODECOVERAGE=1
vendor/bin/phpunit --display-warnings --display-incomplete --coverage-clover=coverage.xml
else
vendor/bin/phpunit --display-phpunit-deprecations --display-deprecations --display-warnings
fi
- name: Submit code coverage
if: matrix.php-version == '8.1'
uses: codecov/codecov-action@v5
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}