diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d41e52151c0eac5b6faf1de681a4e7dfcf623f1..dfcba0f5f869899d80d1e019d80a65f8047c2de9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,15 +26,18 @@ before_script: stages: # List of stages for jobs, and their order of execution - test + - check-warnings - build - deploy unit-test-job: stage: test script: - - make test + - make test 2>&1 | tee errors.log artifacts: when: always + paths: + - errors.log reports: junit: nosetests.xml @@ -48,6 +51,13 @@ pyflakes-test-job: script: - make pyflakes +check-deprecation-warnings: + before_script: [] + stage: check-warnings + script: + - "if [[ $(grep DeprecationWarning errors.log) ]]; then cat errors.log; exit 1; fi" + allow_failure: true + build-job: stage: build script: diff --git a/Makefile b/Makefile index 54ccd0077ae2c8b88e558b5c065dc7f1aa49dc9c..24074e6421510828611f959b86994c6ee31169f2 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ pylint-test: FORCE test: FORCE @echo "\n${GREEN}*** Checking code with nosetests ***${NC}\n" - @nosetests test_idea.py --with-xunit + @python3 -W always::DeprecationWarning -m nose test_idea.py --with-xunit #-------------------------------------------------------------------------------