From a9011880a343302f9b1e1228c1c2a3c81da58783 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Mon, 18 Apr 2022 08:36:07 -0500 Subject: [PATCH] do not install tox repeatedly --- testing/downstream_testing/README.rst | 10 ++-------- testing/downstream_testing/downstream_runner.py | 2 +- testing/downstream_testing/entrypoint.sh | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/testing/downstream_testing/README.rst b/testing/downstream_testing/README.rst index 6887d14a3..ea127f109 100644 --- a/testing/downstream_testing/README.rst +++ b/testing/downstream_testing/README.rst @@ -20,7 +20,7 @@ Overview - The plugin's ``tox`` config is adjusted to ensure the local ``pytest`` is used. -- Uses a static command set: ``pip install tox`` & ``tox -e {toxenv}``. +- Uses a static command set: ``tox -e {toxenv}``. How To Add Additional Plugin(s) ------------------------------- @@ -157,17 +157,11 @@ Any additions can be verified locally with the following process: DEBUG | downstream_runner.build_run | matrix[job]: {'name': 'py39', 'tox_cmd': 'py39'} DEBUG | downstream_runner.build_run | matrix[job]: {'name': 'py310', 'tox_cmd': 'py310'} DEBUG | downstream_runner.build_run | matrix[job]: {'name': 'pypy3', 'tox_cmd': 'pypy3'} - DEBUG | downstream_runner.build_run | built run: {'py37': ['pip install tox', 'tox -e py37'], 'py38': ['pip install tox', 'tox -e py38'], 'py39': ['pip install tox', - 'tox -e py39'], 'py310': ['pip install tox', 'tox -e py310'], 'pypy3': ['pip install tox', 'tox -e pypy3']} - INFO | downstream_runner.run | --> running: 'pip install tox' + DEBUG | downstream_runner.build_run | built run: {'py37': ['tox -e py37'], 'py38': ['tox -e py38'], 'py39': ['tox -e py39'], 'py310': ['tox -e py310'], 'pypy3': ['tox -e pypy3']} INFO | downstream_runner.run | --> running: 'tox -e py37' - INFO | downstream_runner.run | --> running: 'pip install tox' INFO | downstream_runner.run | --> running: 'tox -e py38' - INFO | downstream_runner.run | --> running: 'pip install tox' INFO | downstream_runner.run | --> running: 'tox -e py39' - INFO | downstream_runner.run | --> running: 'pip install tox' INFO | downstream_runner.run | --> running: 'tox -e py310' - INFO | downstream_runner.run | --> running: 'pip install tox' INFO | downstream_runner.run | --> running: 'tox -e pypy3' diff --git a/testing/downstream_testing/downstream_runner.py b/testing/downstream_testing/downstream_runner.py index e90856bcb..c1917ea6c 100644 --- a/testing/downstream_testing/downstream_runner.py +++ b/testing/downstream_testing/downstream_runner.py @@ -299,7 +299,7 @@ class DownstreamRunner: logger.debug("job_name: %s", job) for matrix in self.matrix[job]: logger.debug("matrix[job]: %s", matrix) - run[matrix["name"]] = ["pip install tox", f"tox -e {matrix['tox_cmd']}"] + run[matrix["name"]] = [f"tox -e {matrix['tox_cmd']}"] logger.debug("built run: %s", run) return run diff --git a/testing/downstream_testing/entrypoint.sh b/testing/downstream_testing/entrypoint.sh index 9b0f35bd6..151bc5458 100755 --- a/testing/downstream_testing/entrypoint.sh +++ b/testing/downstream_testing/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash -python3.9 -m pip install --no-cache-dir pyyaml sh +python3.9 -m pip install --no-cache-dir pyyaml tox sh cd /pytest python3.9 -u -m testing.downstream_testing.downstream_runner $DS_NAME $DS_YAML $DS_JOBS --matrix-exclude $DS_MATRIX_EXCLUDE