-
Notifications
You must be signed in to change notification settings - Fork 15
109 lines (106 loc) · 2.98 KB
/
tests.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: CI
on:
pull_request: null
push:
branches:
- 1.x
- 2.x
schedule:
- cron: "42 7 * * 1"
jobs:
Tests:
runs-on: 'ubuntu-latest'
env:
SYMFONY_DEPRECATIONS_HELPER: disabled
strategy:
matrix:
php:
- '8.1'
- '8.2'
- '8.3'
dependencies: ['highest']
coverage: ['xdebug']
phpunit: [false]
include:
- description: 'PHPUnit 11'
coverage: 'xdebug3'
php: '8.3'
phpunit: "^11"
- description: 'Xdebug 2'
coverage: 'xdebug2'
php: '8.1'
- description: 'PCov'
coverage: 'pcov'
php: '8.1'
- description: 'lowest'
coverage: 'xdebug2'
php: '8.1'
dependencies: 'lowest'
name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ matrix.coverage }}
- run: composer remove --dev facile-it/facile-coding-standard vimeo/psalm psalm/plugin-phpunit psalm/plugin-symfony --no-update
if: matrix.dependencies == 'lowest' || matrix.phpunit
- run: composer require phpunit/phpunit ${{ matrix.phpunit }} --no-update
if: matrix.phpunit
- uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
- run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: './coverage.xml'
fail_ci_if_error: true
Rector:
runs-on: ubuntu-latest
name: Rector
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- uses: ramsey/composer-install@v3
with:
dependency-versions: highest
- run: vendor/bin/rector --ansi --dry-run
PHP-CS-Fixer:
runs-on: ubuntu-latest
name: Code style
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- uses: ramsey/composer-install@v3
with:
dependency-versions: highest
- run: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run
PHPStan:
runs-on: ubuntu-latest
name: PHPStan
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- uses: ramsey/composer-install@v3
with:
dependency-versions: highest
- run: vendor/bin/phpstan analyse --ansi
Psalm:
runs-on: ubuntu-latest
name: Psalm
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- uses: ramsey/composer-install@v3
with:
dependency-versions: highest
- run: vendor/bin/psalm