Skip to content

Commit

Permalink
Ensure there are builds for both ORM versions on latest PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker authored and franmomu committed Jun 10, 2024
1 parent 50449d5 commit f562f34
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

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

services:
Expand All @@ -33,17 +33,27 @@ jobs:
- "highest"
no-annotations:
- false
orm:
- ""
include:
- deps: "lowest"
php-version: "7.4"
- deps: "highest"
php-version: "8.3"
# Run builds on low and high PHP versions with `doctrine/annotations` removed
- deps: "highest"
php-version: "7.4"
no-annotations: true
- deps: "highest"
php-version: "8.3"
no-annotations: true
# Run builds on high PHP version with `doctrine/orm` version pinned
- deps: "highest"
php-version: "8.3"
orm: "^2.14"
- deps: "highest"
php-version: "8.3"
orm: "^3.0"

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

# Pin doctrine/orm if configured to do so
- name: "Pin doctrine/orm"
if: "${{ matrix.orm }}"
run: "composer require --dev --no-update doctrine/orm:${{ matrix.orm }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
Expand All @@ -78,7 +93,7 @@ jobs:
- name: "Upload coverage file"
uses: "actions/upload-artifact@v4"
with:
name: "${{ github.job }}-${{ matrix.php-version }}-${{ matrix.deps }}-${{ matrix.no-annotations == true && 'no-annotations' || 'with-annotations' }}-coverage"
name: "${{ github.job }}-${{ matrix.php-version }}-${{ matrix.deps }}-${{ matrix.no-annotations == true && 'no-annotations' || 'with-annotations' }}${{ matrix.orm != '' && format('-orm-{0}', matrix.orm) || '' }}-coverage"
path: "coverage.xml"

lint-doctrine-xml-schema:
Expand Down

0 comments on commit f562f34

Please sign in to comment.