diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d447495b3..b1a2f7f46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,3 +109,13 @@ jobs: - name: Tests - Functional run: make test-functional + + - uses: actions/upload-artifact@v4 + with: + name: Functional tests - deprecated log - full + path: var/logs/test.deprecations.log + + - uses: actions/upload-artifact@v4 + with: + name: Functional tests - deprecated log - report + path: var/logs/test.deprecations_grouped.log diff --git a/Makefile b/Makefile index 376cc30fa..793639d66 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,9 @@ behat: test-functional: data config htdocs/uploads tmp CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest mailcatcher CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) up -d dbtest apachephptest mailcatcher + make clean-test-deprecated-log CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm cliphp ./bin/behat + make var/logs/test.deprecations_grouped.log CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest mailcatcher ### Analyse PHPStan @@ -161,3 +163,9 @@ db-migrations: db-seed: php bin/phinx seed:run + +clean-test-deprecated-log: + rm -f var/logs/test.deprecations.log + +var/logs/test.deprecations_grouped.log: + cat var/logs/test.deprecations.log | cut -d "]" -f 2 | awk '{$$1=$$1};1' | sort | uniq -c | sort -nr > var/logs/test.deprecations_grouped.log diff --git a/app/config/config_test.yml b/app/config/config_test.yml index 846cf0e82..1d1dd2b49 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -34,3 +34,16 @@ services: ewz_recaptcha: enabled: false + + +monolog: + handlers: + deprecation_stream: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log" + + deprecation_filter: + type: filter + handler: deprecation_stream + max_level: info + channels: ["php"]