From aa9bdc9cbee742f65dbc515acafbea4db30b546d Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 31 Jan 2024 21:39:22 +0100 Subject: [PATCH] ci: remove django 2.2 targets (#86402) --- .coveragerc | 5 ----- pylint.sh | 2 -- tox.ini | 29 +++++++++++++++++++++-------- 3 files changed, 21 insertions(+), 15 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 7c3cacb..0000000 --- a/.coveragerc +++ /dev/null @@ -1,5 +0,0 @@ -[run] -dynamic_context = test_function - -[html] -show_contexts = True diff --git a/pylint.sh b/pylint.sh index d7295cc..024f72e 100755 --- a/pylint.sh +++ b/pylint.sh @@ -1,7 +1,5 @@ #!/bin/sh -set -e -x -env if [ -f /var/lib/jenkins/pylint.django.rc ]; then PYLINT_RC=/var/lib/jenkins/pylint.django.rc elif [ -f pylint.django.rc ]; then diff --git a/tox.ini b/tox.ini index e36df85..1cb3bd2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,21 @@ [tox] -envlist = code-style,py3-django{2,3}2-coverage +envlist = py3,code-style toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/django-mellon/ [testenv] whitelist_externals = /bin/mv setenv = - DJANGO_SETTINGS_MODULE=testsettings PYTHONPATH=. - SETUPTOOLS_USE_DISTUTILS=stdlib + DJANGO_SETTINGS_MODULE=testsettings + JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml} + COVERAGE={tty::--cov --cov-append --cov-report xml --cov-report html --cov-context=test --cov-config=tox.ini} coverage: COVERAGE=--cov=mellon --cov-branch --cov-append --cov-report xml --cov-report html --cov-config .coveragerc usedevelop = coverage: true deps = - django22: django>=2.2,<2.3 psycopg2-binary - django22: psycopg2-binary<2.9 - django32: django>=3.2.12,<3.3 + django>=3.2.12,<3.3 mock<4 httmock pytest @@ -36,7 +35,7 @@ allowlist_externals = ./getlasso3.sh commands = ./getlasso3.sh - py.test -o junit_suite_name={envname} --junit-xml=junit-{envname}.xml --random {env:COVERAGE:} {posargs:tests} + py.test {env:JUNIT:} {env:COVERAGE:} {posargs:tests} [testenv:pylint] basepython = python3 @@ -44,7 +43,10 @@ deps = pylint<3 astroid<3 pylint-django - psycopg2<2.9 + psycopg2-binary +allowlist_externals = + ./getlasso3.sh + ./pylint.sh commands = ./getlasso3.sh ./pylint.sh mellon @@ -57,6 +59,8 @@ setenv = PYTHONPATH=.:tests deps = psycopg2-binary +allowlist_externals = + ./getlasso3.sh commands = ./getlasso3.sh django-admin {posargs:--help} @@ -70,3 +74,12 @@ commands = [pytest] junit_family=legacy + +[coverage:run] +source = + mellon + tests +branch = True + +[coverage:html] +show_contexts = True