Skip to content

Commit 4b47e58

Browse files
authored
Merge bdb9b07 into d013a96
2 parents d013a96 + bdb9b07 commit 4b47e58

File tree

5 files changed

+85
-177
lines changed

5 files changed

+85
-177
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ on: # Build any PRs and main branch changes
1414
- '.github/workflows/coverage-upload.yml'
1515
- '.github/workflows/reusable-CI-workflow.yml'
1616
- '.github/workflows/reusable-coverage-upload-workflow.yml'
17-
- '.github/workflows/reusable-nightly-tests-workflow.yml'
1817
- '.github/workflows/auto-merge-dependabot.yml'
1918
push:
2019
branches: [ master ]

.github/workflows/nightly-tests.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/pre-check-CI-updates.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ on:
1616
- '.github/workflows/coverage-upload.yml'
1717
- '.github/workflows/reusable-CI-workflow.yml'
1818
- '.github/workflows/reusable-coverage-upload-workflow.yml'
19-
- '.github/workflows/reusable-nightly-tests-workflow.yml'
2019
- '.github/workflows/auto-merge-dependabot.yml'
2120

22-
2321
permissions:
2422
contents: read
2523
checks: write # For the check run creation !
@@ -35,14 +33,6 @@ jobs:
3533
contents: read
3634
uses: ./.github/workflows/reusable-CI-workflow.yml
3735

38-
nightly:
39-
name: Nightly
40-
needs: [tests]
41-
permissions:
42-
contents: read
43-
checks: write # For the check run creation !
44-
uses: ./.github/workflows/reusable-nightly-tests-workflow.yml
45-
4636
upload:
4737
name: Upload
4838
needs: [tests]

.github/workflows/reusable-CI-workflow.yml

Lines changed: 85 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: 'CI reusable workflow'
33
on:
44
workflow_call:
55

6+
permissions:
7+
contents: read
8+
69
env:
710
COMPOSER_PREFER_STABLE: '1'
811
TEST_OUTPUT_STYLE: pretty
912

10-
11-
permissions:
12-
contents: read
13-
1413
jobs:
1514
fetch-supported-versions:
1615
name: Fetch supported versions
@@ -214,3 +213,85 @@ jobs:
214213
- name: Dependencies check
215214
if: ${{ github.event_name == 'pull_request' }}
216215
uses: actions/dependency-review-action@v4
216+
217+
nightly-tests:
218+
name: Nightly - ${{ matrix.job-name }}
219+
needs: [ fetch-supported-versions, tests ]
220+
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'with-nightly-tests') ) }}
221+
runs-on: ubuntu-latest
222+
continue-on-error: true
223+
permissions:
224+
contents: read
225+
checks: write # For the check run creation !
226+
env:
227+
COMPOSER_IGNORE_PLATFORM_REQ: 'php+'
228+
strategy:
229+
fail-fast: false
230+
matrix:
231+
include:
232+
- job-name: PHP - With highest supported Symfony versions
233+
php-version: ${{ needs.fetch-supported-versions.outputs.php-next }}
234+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-max }}
235+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
236+
pkg-extra-constraints: behat/gherkin:~4.12.0
237+
- job-name: PHP - With lowest supported Symfony versions
238+
php-version: ${{ needs.fetch-supported-versions.outputs.php-next }}
239+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-min }}
240+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
241+
pkg-extra-constraints: behat/gherkin:~4.12.0
242+
- job-name: Symfony - With highest supported PHP version
243+
php-version: ${{ needs.fetch-supported-versions.outputs.php-max }}
244+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-next }}
245+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
246+
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
247+
pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-max == '8.4' ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }}
248+
- job-name: Symfony - With lowest supported PHP version
249+
# Fix - Sf 7.0 require php 8.1 minimum, most of deps require 8.2 !
250+
php-version: ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.2' || needs.fetch-supported-versions.outputs.php-min }}
251+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-next }}
252+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
253+
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
254+
pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }}
255+
256+
steps:
257+
- name: Check out code
258+
uses: actions/checkout@v5
259+
260+
- name: Setup PHP ${{ matrix.php-version }}
261+
id: setup-php
262+
uses: shivammathur/setup-php@v2
263+
env:
264+
update: true # whether to use latest available patch for the version or not
265+
fail-fast: true # step will fail if an extension or tool fails to set up
266+
with:
267+
php-version: ${{ matrix.php-version }}
268+
tools: composer
269+
coverage: none
270+
271+
- name: Get composer cache directory
272+
id: composer-cache
273+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
274+
275+
- name: Setup cache for PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }}
276+
uses: actions/cache@v4
277+
with:
278+
path: |
279+
${{ steps.composer-cache.outputs.dir }}
280+
# Clear the cache if composer.json (as composer.lock is not available) has been updated
281+
key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
282+
283+
- name: Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }}
284+
run: |
285+
SF_CONSTRAINT="~${{ matrix.symfony-version }}.0@dev"
286+
composer config minimum-stability dev \
287+
&& composer require -W \
288+
symfony/config:${SF_CONSTRAINT} \
289+
symfony/dependency-injection:${SF_CONSTRAINT} \
290+
symfony/event-dispatcher:${SF_CONSTRAINT} \
291+
symfony/http-foundation:${SF_CONSTRAINT} \
292+
symfony/http-kernel:${SF_CONSTRAINT} \
293+
${{ matrix.pkg-extra-constraints }} \
294+
&& make build
295+
296+
- name: Test
297+
run: make test-unit && make test-functional

.github/workflows/reusable-nightly-tests-workflow.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)