Skip to content

Commit f562f34

Browse files
mbabkerfranmomu
authored andcommitted
Ensure there are builds for both ORM versions on latest PHP
1 parent 50449d5 commit f562f34

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111

1212
jobs:
1313
phpunit:
14-
name: "PHPUnit ${{ matrix.php-version }} (${{ matrix.deps }})${{ matrix.no-annotations == true && ' - Without Annotations' || '' }}"
14+
name: "PHPUnit ${{ matrix.php-version }} (${{ matrix.deps }})${{ matrix.no-annotations == true && ' - Without Annotations' || '' }}${{ matrix.orm != '' && format(' - ORM {0}', matrix.orm) || '' }}"
1515
runs-on: "ubuntu-20.04"
1616

1717
services:
@@ -33,17 +33,27 @@ jobs:
3333
- "highest"
3434
no-annotations:
3535
- false
36+
orm:
37+
- ""
3638
include:
3739
- deps: "lowest"
3840
php-version: "7.4"
3941
- deps: "highest"
4042
php-version: "8.3"
43+
# Run builds on low and high PHP versions with `doctrine/annotations` removed
4144
- deps: "highest"
4245
php-version: "7.4"
4346
no-annotations: true
4447
- deps: "highest"
4548
php-version: "8.3"
4649
no-annotations: true
50+
# Run builds on high PHP version with `doctrine/orm` version pinned
51+
- deps: "highest"
52+
php-version: "8.3"
53+
orm: "^2.14"
54+
- deps: "highest"
55+
php-version: "8.3"
56+
orm: "^3.0"
4757

4858
steps:
4959
- name: "Checkout"
@@ -67,6 +77,11 @@ jobs:
6777
if: "${{ matrix.no-annotations }}"
6878
run: "composer remove --dev --no-update doctrine/annotations"
6979

80+
# Pin doctrine/orm if configured to do so
81+
- name: "Pin doctrine/orm"
82+
if: "${{ matrix.orm }}"
83+
run: "composer require --dev --no-update doctrine/orm:${{ matrix.orm }}"
84+
7085
- name: "Install dependencies with Composer"
7186
uses: "ramsey/composer-install@v3"
7287
with:
@@ -78,7 +93,7 @@ jobs:
7893
- name: "Upload coverage file"
7994
uses: "actions/upload-artifact@v4"
8095
with:
81-
name: "${{ github.job }}-${{ matrix.php-version }}-${{ matrix.deps }}-${{ matrix.no-annotations == true && 'no-annotations' || 'with-annotations' }}-coverage"
96+
name: "${{ github.job }}-${{ matrix.php-version }}-${{ matrix.deps }}-${{ matrix.no-annotations == true && 'no-annotations' || 'with-annotations' }}${{ matrix.orm != '' && format('-orm-{0}', matrix.orm) || '' }}-coverage"
8297
path: "coverage.xml"
8398

8499
lint-doctrine-xml-schema:

0 commit comments

Comments
 (0)