@@ -12,7 +12,7 @@ on: # Build any PRs and main branch changes
1212 - cron : ' 0 0 1 * *' # Every month
1313
1414concurrency :
15- group : " CI -${{ github.head_ref }}"
15+ group : " ${{ github.workflow }} -${{ github.head_ref || github.ref }}"
1616 cancel-in-progress : true
1717
1818env :
2323 CODACY_CACHE_PATH : ~/.cache/codacy
2424 CODACY_BIN : ~/.cache/codacy/codacy.sh
2525
26+
27+ # permissions:
28+ # actions: write # Required to be able to trigger sub CI workflows
29+
2630jobs :
2731 tests :
2832 name : UTs & FTs - Symfony ${{ matrix.symfony-version }}
@@ -34,10 +38,10 @@ jobs:
3438 max-parallel : 4
3539 matrix :
3640 php-version :
37- - ' 7.3' # Lowest supported
38- - ' 7.4' # Latest php 7 version
39- - ' 8.0' # First php 8 version
4041 - ' 8.1' # Latest supported
42+ - ' 8.0' # First php 8 version
43+ - ' 7.4' # Latest php 7 version
44+ - ' 7.3' # Lowest supported
4145 symfony-version :
4246 - ' 4.4' # Lowest LTS
4347 - ' 5.4' # Latest LTS
@@ -124,6 +128,41 @@ jobs:
124128 if : ${{ env.COVERAGE_TYPE == 'xdebug' }}
125129 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
126130
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+
127166 finalize-codacy-coverage-report :
128167 runs-on : ubuntu-latest
129168 name : Finalize Codacy coverage report
@@ -147,3 +186,64 @@ jobs:
147186
148187 - name : Finalize reporting
149188 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