From 4ba8bd85ff5c8409bf0c87bfa4acf05dcf4a5dc7 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Sat, 3 Feb 2024 15:07:29 +0100 Subject: [PATCH] ci: remove python2 support and testing --- Jenkinsfile | 2 +- setup.py | 2 +- tox.ini | 19 +++++++++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4882a4b..34f5c18 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { utils.publish_coverage('coverage.xml') utils.publish_coverage_native('index.html') } - junit '*_results.xml' + mergeJunitResults() } } } diff --git a/setup.py b/setup.py index 23b30bc..9974960 100755 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ setup( packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, - install_requires=['python-ldap', 'six'], + install_requires=['python-ldap>2', 'six'], entry_points={ 'console_scripts': ['ldapsync=ldaptools.ldapsync.cmd:main'], }, diff --git a/tox.ini b/tox.ini index ca37197..9b9998b 100644 --- a/tox.ini +++ b/tox.ini @@ -5,22 +5,29 @@ [tox] toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/ldaptools/ -envlist = py2-coverage-ldap2,py{2,3}-coverage-ldap3 +envlist = py3 [testenv] usedevelop = true setenv = - coverage: COVERAGE=--junit-xml=test_results.xml --cov=src --cov-report xml --cov-report html + COVERAGE={tty::--cov --cov-append --cov-report xml --cov-report html --cov-context=test --cov-config=tox.ini} + JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml} deps = - coverage pytest pytest-cov pytest-random - ldap3: python-ldap>2 - ldap2: python-ldap<3 commands = - py.test {env:COVERAGE:} {posargs:--random tests} + py.test {env:JUNIT:} {env:COVERAGE:} {posargs:--random tests} [pytest] junit_family=xunit2 + +[coverage:run] +source = + src + tests +branch = True + +[coverage:html] +show_contexts = True