Skip to content

Commit ffd5a7c

Browse files
authored
Revert Nightly split (#110)
1 parent d013a96 commit ffd5a7c

File tree

5 files changed

+84
-177
lines changed

5 files changed

+84
-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: 84 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,84 @@ 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+
env:
226+
COMPOSER_IGNORE_PLATFORM_REQ: 'php+'
227+
strategy:
228+
fail-fast: false
229+
matrix:
230+
include:
231+
- job-name: PHP - With highest supported Symfony versions
232+
php-version: ${{ needs.fetch-supported-versions.outputs.php-next }}
233+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-max }}
234+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
235+
pkg-extra-constraints: behat/gherkin:~4.12.0
236+
- job-name: PHP - With lowest supported Symfony versions
237+
php-version: ${{ needs.fetch-supported-versions.outputs.php-next }}
238+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-min }}
239+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
240+
pkg-extra-constraints: behat/gherkin:~4.12.0
241+
- job-name: Symfony - With highest supported PHP version
242+
php-version: ${{ needs.fetch-supported-versions.outputs.php-max }}
243+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-next }}
244+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
245+
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
246+
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' || '' }}
247+
- job-name: Symfony - With lowest supported PHP version
248+
# Fix - Sf 7.0 require php 8.1 minimum, most of deps require 8.2 !
249+
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 }}
250+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-next }}
251+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
252+
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
253+
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' || '' }}
254+
255+
steps:
256+
- name: Check out code
257+
uses: actions/checkout@v5
258+
259+
- name: Setup PHP ${{ matrix.php-version }}
260+
id: setup-php
261+
uses: shivammathur/setup-php@v2
262+
env:
263+
update: true # whether to use latest available patch for the version or not
264+
fail-fast: true # step will fail if an extension or tool fails to set up
265+
with:
266+
php-version: ${{ matrix.php-version }}
267+
tools: composer
268+
coverage: none
269+
270+
- name: Get composer cache directory
271+
id: composer-cache
272+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
273+
274+
- name: Setup cache for PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }}
275+
uses: actions/cache@v4
276+
with:
277+
path: |
278+
${{ steps.composer-cache.outputs.dir }}
279+
# Clear the cache if composer.json (as composer.lock is not available) has been updated
280+
key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
281+
282+
- name: Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }}
283+
run: |
284+
SF_CONSTRAINT="~${{ matrix.symfony-version }}.0@dev"
285+
composer config minimum-stability dev \
286+
&& composer require -W \
287+
symfony/config:${SF_CONSTRAINT} \
288+
symfony/dependency-injection:${SF_CONSTRAINT} \
289+
symfony/event-dispatcher:${SF_CONSTRAINT} \
290+
symfony/http-foundation:${SF_CONSTRAINT} \
291+
symfony/http-kernel:${SF_CONSTRAINT} \
292+
${{ matrix.pkg-extra-constraints }} \
293+
&& make build
294+
295+
- name: Test
296+
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)