-
Notifications
You must be signed in to change notification settings - Fork 109
112 lines (98 loc) · 2.97 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
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
110
111
112
name: CI
on: [ push, pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
env:
php-version: 8.4
steps:
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
tools: flex
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--optimize-autoloader"
- name: "Run PHPStan"
run: |
vendor/bin/simple-phpunit --version
vendor/bin/phpstan analyse --no-progress
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
env:
php-version: 8.2
PHP_CS_FIXER_IGNORE_ENV: 1
steps:
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
tools: flex, cs2pr
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--optimize-autoloader"
- name: "Run PHP-CS-Fixer"
run: vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no --format=checkstyle | cs2pr
phpunit:
name: PHPUnit (PHP ${{ matrix.php }}) (Symfony ${{ matrix.sf_version }}) (${{ matrix.dependencies }})
runs-on: ubuntu-latest
strategy:
max-parallel: 10
fail-fast: false
matrix:
dependencies: ['highest']
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
sf_version: ['4.4.*', '5.4.*', '6.4.*', '7.1.*', '7.2.*']
exclude:
- php: '7.4'
sf_version: '4.4.*'
- php: '8.4'
sf_version: '4.4.*'
- php: '7.4'
sf_version: '6.4.*'
- php: '8.0'
sf_version: '6.4.*'
- php: '7.4'
sf_version: '7.1.*'
- php: '8.0'
sf_version: '7.1.*'
- php: '8.1'
sf_version: '7.1.*'
- php: '7.4'
sf_version: '7.2.*'
- php: '8.0'
sf_version: '7.2.*'
- php: '8.1'
sf_version: '7.2.*'
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
coverage: none
- name: "Install Composer dependencies"
env:
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
uses: "ramsey/composer-install@v3"
with:
composer-options: "--optimize-autoloader"
dependency-versions: "${{ matrix.dependencies }}"
- name: "Run tests"
env:
SYMFONY_DEPRECATIONS_HELPER: 'ignoreFile=./tests/baseline-ignore'
run: ./vendor/bin/simple-phpunit -v