Skip to content

Commit e88a7f6

Browse files
authored
ci: test against lowest dependencies (api-platform#5329)
1 parent 3d8371a commit e88a7f6

File tree

2 files changed

+92
-2
lines changed

2 files changed

+92
-2
lines changed

.github/workflows/ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,3 +753,90 @@ jobs:
753753
run: tests/Fixtures/app/console cache:clear --ansi
754754
- name: Run Behat tests
755755
run: vendor/bin/behat --out=std --format=progress --profile=default --no-interaction
756+
757+
phpunit-symfony-lowest:
758+
name: PHPUnit (PHP ${{ matrix.php }}) (Symfony lowest)
759+
runs-on: ubuntu-latest
760+
timeout-minutes: 20
761+
strategy:
762+
matrix:
763+
php:
764+
- '8.1'
765+
- '8.2'
766+
fail-fast: false
767+
# env:
768+
# See https://github.com/doctrine/DoctrineMongoDBBundle/pull/673
769+
#SYMFONY_DEPRECATIONS_HELPER: max[direct]=0
770+
steps:
771+
- name: Checkout
772+
uses: actions/checkout@v3
773+
- name: Setup PHP
774+
uses: shivammathur/setup-php@v2
775+
with:
776+
php-version: ${{ matrix.php }}
777+
tools: pecl, composer
778+
extensions: intl, bcmath, curl, openssl, mbstring
779+
coverage: none
780+
ini-values: memory_limit=-1
781+
- name: Get composer cache directory
782+
id: composercache
783+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
784+
- name: Cache dependencies
785+
uses: actions/cache@v3
786+
with:
787+
path: ${{ steps.composercache.outputs.dir }}
788+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
789+
restore-keys: ${{ runner.os }}-composer-
790+
- name: Remove cache
791+
run: rm -Rf tests/Fixtures/app/var/cache/*
792+
- name: Update project dependencies
793+
run: composer update --prefer-lowest --no-interaction --no-progress --ansi
794+
- name: Install PHPUnit
795+
run: vendor/bin/simple-phpunit --version
796+
- name: Clear test app cache
797+
run: tests/Fixtures/app/console cache:clear --ansi
798+
- name: Run PHPUnit tests
799+
run: vendor/bin/simple-phpunit
800+
801+
behat-symfony-lowest:
802+
name: Behat (PHP ${{ matrix.php }}) (Symfony lowest)
803+
runs-on: ubuntu-latest
804+
timeout-minutes: 20
805+
strategy:
806+
matrix:
807+
php:
808+
- '8.1'
809+
- '8.2'
810+
fail-fast: false
811+
steps:
812+
- name: Checkout
813+
uses: actions/checkout@v3
814+
- name: Setup PHP
815+
uses: shivammathur/setup-php@v2
816+
with:
817+
php-version: ${{ matrix.php }}
818+
tools: pecl, composer
819+
extensions: intl, bcmath, curl, openssl, mbstring
820+
coverage: none
821+
ini-values: memory_limit=-1
822+
- name: Install additional packages
823+
run: sudo apt-get install moreutils
824+
- name: Get composer cache directory
825+
id: composercache
826+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
827+
- name: Cache dependencies
828+
uses: actions/cache@v3
829+
with:
830+
path: ${{ steps.composercache.outputs.dir }}
831+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
832+
restore-keys: ${{ runner.os }}-composer-
833+
- name: Remove cache
834+
run: rm -Rf tests/Fixtures/app/var/cache/*
835+
- name: Update project dependencies
836+
run: composer update --prefer-lowest --no-interaction --no-progress --ansi
837+
- name: Install PHPUnit
838+
run: vendor/bin/simple-phpunit --version
839+
- name: Clear test app cache
840+
run: tests/Fixtures/app/console cache:clear --ansi
841+
- name: Run Behat tests
842+
run: vendor/bin/behat --out=std --format=progress --profile=default --no-interaction

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
"symfony/property-info": "^6.1",
2525
"symfony/serializer": "^6.1",
2626
"symfony/web-link": "^6.1",
27-
"willdurand/negotiation": "^2.0.3 || ^3.0"
27+
"willdurand/negotiation": "^3.0"
2828
},
2929
"require-dev": {
3030
"behat/behat": "^3.1",
3131
"behat/mink": "^1.9@dev",
3232
"doctrine/cache": "^1.11 || ^2.1",
33-
"doctrine/common": "^2.11 || ^3.0",
33+
"doctrine/common": "^2.11 || ^3.1",
3434
"doctrine/data-fixtures": "^1.2.2",
3535
"doctrine/dbal": "^2.6 || ^3.0",
3636
"doctrine/doctrine-bundle": "^1.12 || ^2.0",
@@ -94,6 +94,9 @@
9494
"doctrine/dbal": "<2.10",
9595
"doctrine/mongodb-odm": "<2.2",
9696
"doctrine/persistence": "<1.3",
97+
"symfony/service-contracts": "<3",
98+
"phpunit/phpunit": "<9.5",
99+
"phpspec/prophecy": "<1.15",
97100
"elasticsearch/elasticsearch": ">=8.0"
98101
},
99102
"suggest": {

0 commit comments

Comments
 (0)