1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-16 10:04:14 +02:00

Fix CI to allow psr/log v2

This commit is contained in:
Nicolas Grekas
2021-09-13 12:13:06 +02:00
parent 57e3fe3173
commit 203bb1b6f5
5 changed files with 144 additions and 10 deletions

View File

@@ -58,18 +58,24 @@ jobs:
- name: Add require for mongodb/mongodb to make tests runnable
run: 'composer require ${{ env.COMPOSER_FLAGS }} mongodb/mongodb --dev --no-update'
# This does not affect runtime, only tests were fixed in psr/log 1.1.2 so it's
# ok to require this only when running tests
- name: Bump required version of psr/log for tests purposes to fix the --prefer-lowest builds
run: 'composer require ${{ env.COMPOSER_FLAGS }} psr/log:^1.1.2 --no-update'
- name: "Handle lowest dependencies update"
if: "contains(matrix.dependencies, 'lowest')"
run: "echo \"COMPOSER_FLAGS=$COMPOSER_FLAGS --prefer-lowest\" >> $GITHUB_ENV"
- name: "Ensure psr/log v2 is installed"
if: "contains(matrix.dependencies, 'highest') && matrix.php-version >= '8.0'"
run: composer require -W psr/log:^2
- name: "Install latest dependencies"
run: |
composer update ${{ env.COMPOSER_FLAGS }}
- name: "Run tests"
run: "composer exec phpunit -- --verbose"
- name: "Run tests with rollbar"
run: |
composer require psr/log:'^1.1|^2' --no-update
composer require rollbar/rollbar:^1.3 --no-update
composer update -W ${{ env.COMPOSER_FLAGS }}
composer exec phpunit -- --verbose --filter Rollbar