From 18ac9f1c06b715b80ca7238885e05bb43d96bcd9 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Nov 2024 20:08:43 +0100 Subject: [PATCH 1/8] test pip in tox --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 661b359c..0ef301fc 100644 --- a/tox.ini +++ b/tox.ini @@ -142,6 +142,7 @@ description = commands = # fail-fast if psycopg in not properly installed. python3 -c "import psycopg" + python3 -m pip freeze sh -c "ansible-test units --color --requirements --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" ansible-test coverage report --requirements --omit '.tox/*,tests/*' --color --all --show-missing -v --truncate 0 ansible-test coverage combine --export={envdir} From 8bf76dea87bfeb309a085a6ac87ac02e96ed83ab Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Nov 2024 20:19:34 +0100 Subject: [PATCH 2/8] remove --requirements --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 0ef301fc..f3711f26 100644 --- a/tox.ini +++ b/tox.ini @@ -142,8 +142,7 @@ description = commands = # fail-fast if psycopg in not properly installed. python3 -c "import psycopg" - python3 -m pip freeze - sh -c "ansible-test units --color --requirements --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" + sh -c "ansible-test units --color --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" ansible-test coverage report --requirements --omit '.tox/*,tests/*' --color --all --show-missing -v --truncate 0 ansible-test coverage combine --export={envdir} From 26212ff147063b967e5acc2f9ad72f6d6dec66b8 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Nov 2024 20:23:03 +0100 Subject: [PATCH 3/8] recover --requirements --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f3711f26..661b359c 100644 --- a/tox.ini +++ b/tox.ini @@ -142,7 +142,7 @@ description = commands = # fail-fast if psycopg in not properly installed. python3 -c "import psycopg" - sh -c "ansible-test units --color --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" + sh -c "ansible-test units --color --requirements --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" ansible-test coverage report --requirements --omit '.tox/*,tests/*' --color --all --show-missing -v --truncate 0 ansible-test coverage combine --export={envdir} From d3cd67140aa54fa7c26939f27f8a7805c3d3ac7f Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Nov 2024 20:27:43 +0100 Subject: [PATCH 4/8] print python path --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 661b359c..2e215675 100644 --- a/tox.ini +++ b/tox.ini @@ -142,6 +142,8 @@ description = commands = # fail-fast if psycopg in not properly installed. python3 -c "import psycopg" + which python + which python3 sh -c "ansible-test units --color --requirements --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" ansible-test coverage report --requirements --omit '.tox/*,tests/*' --color --all --show-missing -v --truncate 0 ansible-test coverage combine --export={envdir} From a06a4cbaddb32f33d52d2f9567209a96a8fa3cad Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Nov 2024 20:28:27 +0100 Subject: [PATCH 5/8] add ensurepip --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 2e215675..eceb3293 100644 --- a/tox.ini +++ b/tox.ini @@ -144,6 +144,7 @@ commands = python3 -c "import psycopg" which python which python3 + python3 -m ensurepip sh -c "ansible-test units --color --requirements --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" ansible-test coverage report --requirements --omit '.tox/*,tests/*' --color --all --show-missing -v --truncate 0 ansible-test coverage combine --export={envdir} From 7f407a9ee41e40516c68c55c3c4b76ddbe5f5bc3 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Nov 2024 20:32:19 +0100 Subject: [PATCH 6/8] remove print which --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index eceb3293..8037d343 100644 --- a/tox.ini +++ b/tox.ini @@ -142,8 +142,6 @@ description = commands = # fail-fast if psycopg in not properly installed. python3 -c "import psycopg" - which python - which python3 python3 -m ensurepip sh -c "ansible-test units --color --requirements --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" ansible-test coverage report --requirements --omit '.tox/*,tests/*' --color --all --show-missing -v --truncate 0 From 787ac7f38c67445480458925de003f98bb2d26c2 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Nov 2024 20:38:19 +0100 Subject: [PATCH 7/8] move ensurepip to the global scope --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8037d343..aba2c2fe 100644 --- a/tox.ini +++ b/tox.ini @@ -28,6 +28,7 @@ description = py{39,310,311,312,313}: with {basepython} deps = -r .config/requirements-test.in commands_pre = + python3 -m ensurepip bash -c 'test "$(basename $(cd ../.. && pwd))" == ansible_collections || { echo "Repository must be cloned inside a directory structure like ansible_collections/ansible/eda in order allow ansible-test to run."; exit 3;}' commands = echo "Implicit tox environment should not be called directly (safety measure to avoid running wrong tests due to typos)" @@ -142,7 +143,6 @@ description = commands = # fail-fast if psycopg in not properly installed. python3 -c "import psycopg" - python3 -m ensurepip sh -c "ansible-test units --color --requirements --target-python default -v --num-workers 1 --coverage --truncate 0 {posargs}" ansible-test coverage report --requirements --omit '.tox/*,tests/*' --color --all --show-missing -v --truncate 0 ansible-test coverage combine --export={envdir} From c86e2fb52043fabdc272962421bde0fc7909114d Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Nov 2024 20:48:37 +0100 Subject: [PATCH 8/8] ping tox-extra --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index aba2c2fe..a8e66ec5 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ skipsdist = true # this repo is not a python package isolated_build = true requires = tox >= 4.6.3 - tox-extra >= 2.0.1 # bindep check + tox-extra == 2.0.2 # bindep check setuptools >= 65.3.0 # editable installs ignore_basepython_conflict = false @@ -28,7 +28,6 @@ description = py{39,310,311,312,313}: with {basepython} deps = -r .config/requirements-test.in commands_pre = - python3 -m ensurepip bash -c 'test "$(basename $(cd ../.. && pwd))" == ansible_collections || { echo "Repository must be cloned inside a directory structure like ansible_collections/ansible/eda in order allow ansible-test to run."; exit 3;}' commands = echo "Implicit tox environment should not be called directly (safety measure to avoid running wrong tests due to typos)"