Skip to content

Commit

Permalink
Merge pull request #1615 from afup/deprecation_log
Browse files Browse the repository at this point in the history
on loggue les dépréciations lors des tests fonctionnels
  • Loading branch information
agallou authored Feb 9, 2025
2 parents 59c8846 + b469d61 commit 238ac59
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
13 changes: 13 additions & 0 deletions app/config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 238ac59

Please sign in to comment.