Skip to content

Commit ac36f02

Browse files
committed
Revert "Split nightly tests (#108)"
This reverts commit 62280ec.
1 parent 7c1a511 commit ac36f02

File tree

6 files changed

+78
-183
lines changed

6 files changed

+78
-183
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 & 13 deletions
This file was deleted.

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ 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

2221
concurrency:
@@ -30,14 +29,6 @@ jobs:
3029
contents: read
3130
uses: ./.github/workflows/reusable-CI-workflow.yml
3231

33-
nightly:
34-
name: Nightly
35-
needs: [tests]
36-
permissions:
37-
contents: read
38-
checks: write # For the check run creation !
39-
uses: ./.github/workflows/reusable-nightly-tests-workflow.yml
40-
4132
upload:
4233
name: Upload
4334
needs: [tests]

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

Lines changed: 78 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@ env:
77
COMPOSER_PREFER_STABLE: '1'
88
TEST_OUTPUT_STYLE: pretty
99

10-
11-
permissions:
12-
contents: read
13-
1410
jobs:
1511
fetch-supported-versions:
1612
name: Fetch supported versions
1713
runs-on: ubuntu-latest
18-
permissions:
19-
contents: read
2014
outputs:
2115
php-min: ${{ steps.fetch-php-versions.outputs.min }}
2216
php-max: ${{ steps.fetch-php-versions.outputs.max }}
@@ -31,7 +25,6 @@ jobs:
3125
with:
3226
dependency: php
3327
path: .github/workflows/supported-versions.json
34-
3528
- name: Fetch Symfony supported versions
3629
id: fetch-symfony-versions
3730
uses: yoanm/gha-supported-versions-parser@feature/init
@@ -43,8 +36,6 @@ jobs:
4336
name: ${{ matrix.job-name }}
4437
needs: [fetch-supported-versions]
4538
runs-on: ubuntu-latest
46-
permissions:
47-
contents: read
4839
env:
4940
COVERAGE_TYPE: none
5041
COVERAGE_OUTPUT_STYLE: clover
@@ -166,8 +157,6 @@ jobs:
166157
name: Static analysis
167158
needs: [fetch-supported-versions]
168159
runs-on: ubuntu-latest
169-
permissions:
170-
contents: read
171160
env:
172161
PHP_VERSION: ${{ needs.fetch-supported-versions.outputs.php-max }}
173162
SYMFONY_VERSION: ${{ needs.fetch-supported-versions.outputs.symfony-max }}
@@ -214,3 +203,81 @@ jobs:
214203
- name: Dependencies check
215204
if: ${{ github.event_name == 'pull_request' }}
216205
uses: actions/dependency-review-action@v4
206+
207+
nightly-tests:
208+
name: Nightly - ${{ matrix.job-name }}
209+
needs: [ fetch-supported-versions, tests ]
210+
runs-on: ubuntu-latest
211+
continue-on-error: true
212+
env:
213+
COMPOSER_IGNORE_PLATFORM_REQ: 'php+'
214+
strategy:
215+
fail-fast: false
216+
matrix:
217+
include:
218+
- job-name: PHP - With highest supported Symfony versions
219+
php-version: ${{ needs.fetch-supported-versions.outputs.php-next }}
220+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-max }}
221+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
222+
pkg-extra-constraints: behat/gherkin:~4.12.0
223+
- job-name: PHP - With lowest supported Symfony versions
224+
php-version: ${{ needs.fetch-supported-versions.outputs.php-next }}
225+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-min }}
226+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
227+
pkg-extra-constraints: behat/gherkin:~4.12.0
228+
- job-name: Symfony - With highest supported PHP version
229+
php-version: ${{ needs.fetch-supported-versions.outputs.php-max }}
230+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-next }}
231+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
232+
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
233+
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' || '' }}
234+
- job-name: Symfony - With lowest supported PHP version
235+
# Fix - Sf 7.0 require php 8.1 minimum, most of deps require 8.2 !
236+
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 }}
237+
symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-next }}
238+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
239+
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
240+
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' || '' }}
241+
242+
steps:
243+
- name: Check out code
244+
uses: actions/checkout@v5
245+
246+
- name: Setup PHP ${{ matrix.php-version }}
247+
id: setup-php
248+
uses: shivammathur/setup-php@v2
249+
env:
250+
update: true # whether to use latest available patch for the version or not
251+
fail-fast: true # step will fail if an extension or tool fails to set up
252+
with:
253+
php-version: ${{ matrix.php-version }}
254+
tools: composer
255+
coverage: none
256+
257+
- name: Get composer cache directory
258+
id: composer-cache
259+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
260+
261+
- name: Setup cache for PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }}
262+
uses: actions/cache@v4
263+
with:
264+
path: |
265+
${{ steps.composer-cache.outputs.dir }}
266+
# Clear the cache if composer.json (as composer.lock is not available) has been updated
267+
key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
268+
269+
- name: Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }}
270+
run: |
271+
SF_CONSTRAINT="~${{ matrix.symfony-version }}.0@dev"
272+
composer config minimum-stability dev \
273+
&& composer require -W \
274+
symfony/config:${SF_CONSTRAINT} \
275+
symfony/dependency-injection:${SF_CONSTRAINT} \
276+
symfony/event-dispatcher:${SF_CONSTRAINT} \
277+
symfony/http-foundation:${SF_CONSTRAINT} \
278+
symfony/http-kernel:${SF_CONSTRAINT} \
279+
${{ matrix.pkg-extra-constraints }} \
280+
&& make build
281+
282+
- name: Test
283+
run: make test-unit && make test-functional

.github/workflows/reusable-coverage-upload-workflow.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ on:
88
CODECOV_TOKEN:
99
required: true
1010

11-
permissions:
12-
contents: read
13-
checks: write # For the check run creation !
14-
1511
jobs:
1612
fetch-info:
1713
name: Fetch triggering workflow metadata

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

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

0 commit comments

Comments
 (0)