Skip to content

Commit

Permalink
ci: Rewrite the matrix to more easily support the different variants (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Dec 3, 2023
1 parent a0354bd commit f4fb04c
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ jobs:
matrix:
php-version:
- '8.2'
dependencies: [ highest ]
variant: [ normal ]
include:
- php-version: '8.2'
dependencies: highest
variant: 'symfony/symfony:"^5.4"'
dependencies: [ highest, lowest ]
variant:
- '"symfony/symfony:^5.4.1 || ^6.0.0"'
- '"symfony/symfony:^5.4"'
- '"symfony/symfony:^6.0"'
exclude:
- dependencies: 'locked'
variant: '"symfony/symfony:^5.4"'
- dependencies: 'locked'
variant: '"symfony/symfony:^6.0"'
# To keep in sync with docker-compose.yml
services:
mysql:
Expand Down Expand Up @@ -89,52 +93,52 @@ jobs:
- name: Install doctrine Composer bin dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/doctrine
- name: Repeat "Install doctrine Composer bin dependencies"
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/doctrine

- name: Install MongoDB Composer bin dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/doctrine_mongodb
- name: Repeat "Install MongoDB Composer bin dependencies"
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/doctrine_mongodb

- name: Install Doctrine PHPCR Composer bin dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/doctrine_phpcr
- name: Repeat "Install Doctrine PHPCR Composer bin dependencies"
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/doctrine_phpcr

- name: Install Eloquent Composer bin dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/eloquent
- name: Repeat "Install Eloquent Composer bin dependencies"
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/eloquent

Expand All @@ -144,49 +148,47 @@ jobs:
# Once this is fixed the whole bin dependencies can probably be installed
# in one step with a timeout adjustment
- name: Remove Symfony from ProxyManager Composer bin dependencies
if: matrix.dependencies != 'locked'
run: composer bin proxy-manager remove --dev symfony/symfony --no-update

- name: Install ProxyManager Composer bin dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/proxy-manager
- name: Repeat "Install ProxyManager Composer bin dependencies"
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/proxy-manager

- name: Add back Symfony for ProxyManager Composer bin dependencies
if: matrix.variant == 'normal'
run: composer bin proxy-manager require --dev "symfony/symfony:^5.4.1 || ^6.0.0" --prefer-dist --prefer-stable ${{ matrix.composer-flags }} --no-update
- name: Add back Symfony (variant) for ProxyManager Composer bin dependencies
if: matrix.variant != 'normal'
run: composer bin proxy-manager require --dev ${{ matrix.variant }} --prefer-dist --prefer-stable ${{ matrix.composer-flags }} --no-update
if: matrix.dependencies != 'locked'
run: composer bin proxy-manager require --dev --no-update ${{ matrix.variant }}

- name: Install Symfony for ProxyManager Composer bin dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/proxy-manager

- name: Configure Symfony (variant) Composer bin dependencies
if: matrix.variant != 'normal'
if: matrix.dependencies != 'locked'
run: composer bin symfony require --dev --no-update ${{ matrix.variant }}

- name: Install Symfony Composer bin dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/symfony
- name: Repeat "Install Symfony Composer bin dependencies"
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
dependency-versions: ${{ matrix.dependencies }}
composer-options: "--prefer-dist --prefer-stable ${{ matrix.composer-flags }}"
working-directory: vendor-bin/symfony

Expand Down

0 comments on commit f4fb04c

Please sign in to comment.