Skip to content

Commit 04f6923

Browse files
committed
Improve
1 parent facaa0e commit 04f6923

File tree

1 file changed

+73
-9
lines changed

1 file changed

+73
-9
lines changed

.github/workflows/CI.yml

Lines changed: 73 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,11 @@ jobs:
6666
max-parallel: 4
6767
matrix:
6868
php-version:
69-
- '7.3'
70-
- '7.4'
71-
- '8.0'
72-
- '8.1'
69+
- '7.3' # Lowest supported
70+
- '8.1' # Latest supported
7371
symfony-version:
74-
- '4.4'
75-
- '5.4'
72+
- '4.4' # Lowest LTS
73+
- '5.4' # Latest LTS
7674
steps:
7775
- name: Check out code
7876
uses: actions/checkout@v2
@@ -164,6 +162,68 @@ jobs:
164162
- name: Finalize reporting
165163
run: ${{ env.CODACY_BIN }} final -t ${{ secrets.CODACY_PROJECT_TOKEN }}
166164

165+
# Test against others impactful php versions (without coverage)
166+
tests-extra-versions:
167+
name: UTs & FTs - PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }}
168+
runs-on: ubuntu-latest
169+
needs: [ tests ]
170+
strategy:
171+
fail-fast: true
172+
max-parallel: 4
173+
matrix:
174+
include:
175+
- php-version: '7.4' # Latest php 7 version
176+
symfony-version: '4.4'
177+
- php-version: '8.0' # First php 8 version
178+
symfony-version: '5.4'
179+
steps:
180+
- name: Check out code
181+
uses: actions/checkout@v2
182+
183+
- name: Setup PHP
184+
uses: shivammathur/setup-php@v2
185+
with:
186+
php-version: '${{ matrix.php-version }}'
187+
tools: composer
188+
env:
189+
# Always use latest available patch for the version
190+
update: true
191+
192+
- name: Setup cache
193+
id: cache
194+
uses: actions/cache@v2
195+
with:
196+
path: |
197+
~/.composer
198+
./vendor
199+
${{ env.CODACY_CACHE_PATH }}
200+
build/behat-code-coverage-cache
201+
# Clear the cache if composer json (as composer.lock is in the repo) has been updated
202+
key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
203+
204+
- name: Download codacy binary
205+
if: steps.cache.outputs.cache-hit != 'true'
206+
run: |
207+
mkdir -p ${{ env.CODACY_CACHE_PATH }} \
208+
&& curl -LN https://coverage.codacy.com/get.sh -o ${{ env.CODACY_BIN }} \
209+
&& chmod +x ${{ env.CODACY_BIN }} \
210+
&& ${{ env.CODACY_BIN }} download
211+
212+
- name: Build
213+
run: |
214+
composer require \
215+
symfony/http-foundation:^${{ matrix.symfony-version }} \
216+
symfony/http-kernel:^${{ matrix.symfony-version }} \
217+
symfony/config:^${{ matrix.symfony-version }} \
218+
symfony/dependency-injection:^${{ matrix.symfony-version }} \
219+
symfony/event-dispatcher:^${{ matrix.symfony-version }} \
220+
symfony/routing:^${{ matrix.symfony-version }} \
221+
&& make build
222+
223+
- name: Tests
224+
run: make test-unit && make test-functional
225+
226+
# Perform tests against current php dev version and next Symfony minor version to manage
167227
nightly-tests:
168228
name: Nightly - PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }}
169229
needs: [ tests ]
@@ -175,10 +235,14 @@ jobs:
175235
max-parallel: 2
176236
matrix:
177237
php-version:
178-
- '8.2'
238+
- '8.2' # Current php dev version
179239
symfony-version:
180-
- '4.4'
181-
- '5.4'
240+
- '4.4' # Lowest LTS
241+
- '5.4' # Latest LTS
242+
include:
243+
- symfony-version: '6.0' # Next symfony minor version to manage with latest supported PHP version
244+
php-version: '8.1'
245+
182246
steps:
183247
- name: Check out code
184248
uses: actions/checkout@v2

0 commit comments

Comments
 (0)