@@ -12,7 +12,7 @@ on: # Build any PRs and main branch changes
12
12
- cron : ' 0 0 1 * *' # Every month
13
13
14
14
concurrency :
15
- group : " CI -${{ github.head_ref }}"
15
+ group : " ${{ github.workflow }} -${{ github.head_ref || github.ref }}"
16
16
cancel-in-progress : true
17
17
18
18
env :
23
23
CODACY_CACHE_PATH : ~/.cache/codacy
24
24
CODACY_BIN : ~/.cache/codacy/codacy.sh
25
25
26
+
27
+ # permissions:
28
+ # actions: write # Required to be able to trigger sub CI workflows
29
+
26
30
jobs :
27
31
tests :
28
32
name : UTs & FTs - Symfony ${{ matrix.symfony-version }}
@@ -34,10 +38,10 @@ jobs:
34
38
max-parallel : 4
35
39
matrix :
36
40
php-version :
37
- - ' 7.3' # Lowest supported
38
- - ' 7.4' # Latest php 7 version
39
- - ' 8.0' # First php 8 version
40
41
- ' 8.1' # Latest supported
42
+ - ' 8.0' # First php 8 version
43
+ - ' 7.4' # Latest php 7 version
44
+ - ' 7.3' # Lowest supported
41
45
symfony-version :
42
46
- ' 4.4' # Lowest LTS
43
47
- ' 5.4' # Latest LTS
@@ -124,6 +128,41 @@ jobs:
124
128
if : ${{ env.COVERAGE_TYPE == 'xdebug' }}
125
129
run : ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial
126
130
131
+ static-checks :
132
+ name : Static checks
133
+ runs-on : ubuntu-latest
134
+ needs : [ tests ]
135
+ steps :
136
+ - uses : actions/checkout@v2
137
+
138
+ - name : Setup PHP 8.1
139
+ uses : shivammathur/setup-php@v2
140
+ with :
141
+ php-version : 8.1 # Latest supported
142
+ tools : composer
143
+ coverage : none
144
+ env :
145
+ # Always use latest available patch for the version
146
+ update : true
147
+
148
+ - name : Setup cache
149
+ id : cache
150
+ uses : actions/cache@v2
151
+ with :
152
+ path : |
153
+ ~/.composer
154
+ # Clear the cache if composer json (as composer.lock is in the repo) has been updated
155
+ key : ${{ env.CACHE_VERSION }}-tests-${{ env.PHP_VERSION }}-${{ hashFiles('composer.json') }}
156
+
157
+ - name : Build
158
+ run : make build
159
+
160
+ - name : ComposerRequireChecker
161
+ uses : docker://webfactory/composer-require-checker:3.2.0
162
+
163
+ - name : Dependencies check
164
+ uses : actions/dependency-review-action@v1
165
+
127
166
finalize-codacy-coverage-report :
128
167
runs-on : ubuntu-latest
129
168
name : Finalize Codacy coverage report
@@ -147,3 +186,64 @@ jobs:
147
186
148
187
- name : Finalize reporting
149
188
run : ${{ env.CODACY_BIN }} final -t ${{ secrets.CODACY_PROJECT_TOKEN }}
189
+
190
+ nightly-tests :
191
+ name : Nightly - Symfony ${{ matrix.symfony-version }}
192
+ runs-on : ubuntu-latest
193
+ env :
194
+ COMPOSER_OPTIONS : ' --optimize-autoloader --ignore-platform-req=php+'
195
+ continue-on-error : true
196
+ needs : [ static-checks, finalize-codacy-coverage-report ]
197
+ strategy :
198
+ fail-fast : false
199
+ max-parallel : 4
200
+ # Perform tests against:
201
+ # - current php dev version with all supported symfony version
202
+ # - next Symfony minor version to manage with latest supported php version
203
+ matrix :
204
+ php-version :
205
+ - ' 8.2' # Current php dev version
206
+ symfony-version :
207
+ - ' 4.4' # Lowest LTS
208
+ - ' 5.4' # Latest LTS
209
+ include :
210
+ - symfony-version : ' 6.0' # Next symfony minor version to manage with latest supported PHP version
211
+ php-version : ' 8.1'
212
+
213
+ steps :
214
+ - name : Check out code
215
+ uses : actions/checkout@v2
216
+
217
+ - name : Setup PHP ${{ matrix.php-version }}
218
+ uses : shivammathur/setup-php@v2
219
+ with :
220
+ php-version : ' ${{ matrix.php-version }}'
221
+ tools : composer
222
+ coverage : none
223
+ env :
224
+ # Always use latest available patch for the version
225
+ update : true
226
+
227
+ - name : Setup cache
228
+ id : cache
229
+ uses : actions/cache@v2
230
+ with :
231
+ path : |
232
+ ~/.composer
233
+ ./vendor
234
+ # Clear the cache if composer json (as composer.lock is in the repo) has been updated
235
+ key : ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
236
+
237
+ - name : Build
238
+ run : |
239
+ composer require -W ${{ env.COMPOSER_OPTIONS }} \
240
+ symfony/http-foundation:^${{ matrix.symfony-version }} \
241
+ symfony/http-kernel:^${{ matrix.symfony-version }} \
242
+ symfony/config:^${{ matrix.symfony-version }} \
243
+ symfony/dependency-injection:^${{ matrix.symfony-version }} \
244
+ symfony/event-dispatcher:^${{ matrix.symfony-version }} \
245
+ symfony/routing:^${{ matrix.symfony-version }} \
246
+ && make build
247
+
248
+ - name : Test
249
+ run : make test-unit && make test-functional
0 commit comments