-
Notifications
You must be signed in to change notification settings - Fork 109
150 lines (132 loc) · 4.86 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
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.1
steps:
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
tools: flex
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Install Composer dependencies"
run: |
composer install --prefer-dist --no-progress --no-interaction --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.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@v3
- name: "Install Composer dependencies"
run: |
composer install --prefer-dist --no-progress --no-interaction --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"
runs-on: ubuntu-latest
strategy:
max-parallel: 10
fail-fast: true
matrix:
strategy: ['default']
php: ['7.4', '8.0', '8.1', '8.2']
include:
- php: '7.4'
sf_version: '5.4.*'
strategy: 'lowest'
- php: '8.0'
sf_version: '5.4.*'
- php: '8.1'
sf_version: '5.4.*'
- php: '8.0'
sf_version: '6.0.*'
- php: '8.1'
sf_version: '6.0.*'
- php: '8.2'
sf_version: '6.2.*'
- php: '8.2'
sf_version: '6.3.*'
steps:
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
coverage: none
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Install Composer dependencies (default)"
if: matrix.strategy != 'lowest'
env:
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
run: composer update --no-interaction --optimize-autoloader
- name: "Install Composer dependencies (lowest)"
if: matrix.strategy == 'lowest'
env:
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
run: composer update --no-interaction --prefer-stable --prefer-lowest --optimize-autoloader
- name: "Run tests"
env:
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=2'
run: ./vendor/bin/simple-phpunit -v --testsuite main
doctrine:
name: "PHPUnit (Doctrine)"
runs-on: ubuntu-latest
strategy:
max-parallel: 10
fail-fast: true
matrix:
php: ['7.4', '8.0', '8.1', '8.2']
include:
- php: '7.4'
sf_version: '5.4.*'
- php: '8.0'
sf_version: '5.4.*'
- php: '8.1'
sf_version: '5.4.*'
- php: '8.0'
sf_version: '6.0.*'
- php: '8.1'
sf_version: '6.0.*'
- php: '8.2'
sf_version: '6.2.*'
- php: '8.2'
sf_version: '6.3.*'
steps:
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
coverage: none
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Install Composer dependencies"
env:
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
run: composer update --prefer-source --no-interaction --optimize-autoloader
- name: "Run tests"
env:
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=2'
run: ./vendor/bin/simple-phpunit -v --testsuite doctrine