-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (44 loc) · 1.59 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
name: CI+
on:
push:
branches:
- '**' # matches every branch
pull_request:
branches:
- master
- dev
- main
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
steps:
- name: Setup PHP (PHP ${{ matrix.php }})
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bcmath
coverage: xdebug
tools: composer
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Composer dependencies
run: composer install
- name: Prepare PHPUnit config file for PHP < 8
run: cp phpunit.xml.dist7 phpunit.xml.dist
if: "matrix.php < 8"
- name: PHPUnit tests (PHP ${{ matrix.php }})
run: php${{ matrix.php }} ./vendor/bin/phpunit --testdox --verbose --stop-on-failure
- uses: symfonycorp/security-checker-action@v3
- name: Coding standard (PHP ${{ matrix.php }})
run: php${{ matrix.php }} ./vendor/bin/ecs check src tests
- name: Code coverage - clover
run: php${{ matrix.php }} -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-clover=var/coverage.xml
- name: Code coverage - text
run: php${{ matrix.php }} -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-text
- name: Fix code coverage paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' var/coverage.xml