Skip to content

Commit

Permalink
on loggue les dépréciations lors des tests fonctionnels
Browse files Browse the repository at this point in the history
Cela permet de voir le type de dépréciation qui sont levées lors
des tests fonctionnels afin de pouvoir les corriger avant de passer
des mises à jour.
  • Loading branch information
agallou committed Feb 9, 2025
1 parent 59c8846 commit b469d61
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 b469d61

Please sign in to comment.