diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2021-11-18 15:08:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 15:08:59 +0100 |
commit | f981682bdc0ca0235d04629c358643be610a860d (patch) | |
tree | 04e3e84a03f606de17c1dd1001648610c1720d12 /.github | |
parent | 8f7640dbefd1adbd7e4104a404fa018f851776b5 (diff) | |
download | spack-f981682bdc0ca0235d04629c358643be610a860d.tar.gz spack-f981682bdc0ca0235d04629c358643be610a860d.tar.bz2 spack-f981682bdc0ca0235d04629c358643be610a860d.tar.xz spack-f981682bdc0ca0235d04629c358643be610a860d.zip |
Allow recent pytest versions to be used with Spack (#25371)
Currently Spack vendors `pytest` at a version which is three major
versions behind the latest (3.2.5 vs. 6.2.4). We do that since v3.2.5
is the latest version supporting Python 2.6. Remaining so much
behind the currently supported versions though might introduce
some incompatibilities and is surely a technical debt.
This PR modifies Spack to:
- Use the vendored `pytest@3.2.5` only as a fallback solution,
if the Python interpreter used for Spack doesn't provide a newer one
- Be able to parse `pytest --collect-only` in all the different output
formats from v3.2.5 to v6.2.4 and use it consistently for `spack unit-test --list-*`
- Updating the unit tests in Github Actions to use a more recent `pytest` version
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/unit_tests.yaml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 764a9cdcf0..2e8f9deef6 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -114,7 +114,7 @@ jobs: patchelf cmake bison libbison-dev kcov - name: Install Python packages run: | - pip install --upgrade pip six setuptools codecov coverage[toml] + pip install --upgrade pip six setuptools pytest codecov coverage[toml] # 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 @@ -173,7 +173,7 @@ jobs: sudo apt-get install -y coreutils kcov csh zsh tcsh fish dash bash - name: Install Python packages run: | - pip install --upgrade pip six setuptools codecov coverage[toml] + pip install --upgrade pip six setuptools pytest codecov coverage[toml] - name: Setup git configuration run: | # Need this for the git tests to succeed. @@ -274,7 +274,7 @@ jobs: patchelf kcov - name: Install Python packages run: | - pip install --upgrade pip six setuptools codecov coverage[toml] clingo + pip install --upgrade pip six setuptools pytest codecov coverage[toml] clingo - name: Setup git configuration run: | # Need this for the git tests to succeed. @@ -317,7 +317,7 @@ jobs: - name: Install Python packages run: | pip install --upgrade pip six setuptools - pip install --upgrade codecov coverage[toml] + pip install --upgrade pytest codecov coverage[toml] - name: Setup Homebrew packages run: | brew install dash fish gcc gnupg2 kcov |