From dc110db65d9ddbc903260185f8766ddf1123653a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 22 Oct 2022 15:53:42 +0200 Subject: Don't install xdist in CI on Python 2.7 (#33474) --- .github/workflows/unit_tests.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 29211ae2bb..aef69fb60f 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -52,7 +52,12 @@ jobs: patchelf cmake bison libbison-dev kcov - name: Install Python packages run: | - pip install --upgrade pip six setuptools pytest codecov[toml] pytest-cov pytest-xdist + pip install --upgrade pip six setuptools pytest codecov[toml] pytest-cov + # Install xdist only on recent Python, to avoid stalling on Python 2.7 due + # to bugs on an unmaintained version of the package. + if [[ ${{ matrix.python-version }} != "2.7" ]]; then + pip install --upgrade pytest-xdist + fi # ensure style checks are not skipped in unit tests for python >= 3.6 # note that true/false (i.e., 1/0) are opposite in conditions in python and bash if python -c 'import sys; sys.exit(not sys.version_info >= (3, 6))'; then -- cgit v1.2.3-60-g2f50