CI: speed-up tests by dropping coverage on Python 2.7 (#33497)

This commit is contained in:
Massimiliano Culpo 2022-10-25 11:41:29 +02:00 committed by GitHub
parent 272767c67f
commit 329adc1d22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,11 +52,11 @@ jobs:
patchelf cmake bison libbison-dev kcov patchelf cmake bison libbison-dev kcov
- name: Install Python packages - name: Install Python packages
run: | run: |
pip install --upgrade pip six setuptools pytest codecov[toml] pytest-cov pip install --upgrade pip six setuptools pytest codecov[toml] pytest-xdist
# Install xdist only on recent Python, to avoid stalling on Python 2.7 due # Install pytest-cov only on recent Python, to avoid stalling on Python 2.7 due
# to bugs on an unmaintained version of the package. # to bugs on an unmaintained version of the package when used with xdist.
if [[ ${{ matrix.python-version }} != "2.7" ]]; then if [[ ${{ matrix.python-version }} != "2.7" ]]; then
pip install --upgrade pytest-xdist pip install --upgrade pytest-cov
fi fi
# ensure style checks are not skipped in unit tests for python >= 3.6 # 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 # note that true/false (i.e., 1/0) are opposite in conditions in python and bash
@ -66,7 +66,7 @@ jobs:
- name: Pin pathlib for Python 2.7 - name: Pin pathlib for Python 2.7
if: ${{ matrix.python-version == 2.7 }} if: ${{ matrix.python-version == 2.7 }}
run: | run: |
pip install -U pathlib2==2.3.6 pip install -U pathlib2==2.3.6 toml
- name: Setup git configuration - name: Setup git configuration
run: | run: |
# Need this for the git tests to succeed. # Need this for the git tests to succeed.
@ -86,7 +86,7 @@ jobs:
SPACK_TEST_SOLVER: ${{ matrix.concretizer }} SPACK_TEST_SOLVER: ${{ matrix.concretizer }}
SPACK_TEST_PARALLEL: 2 SPACK_TEST_PARALLEL: 2
COVERAGE: true COVERAGE: true
UNIT_TEST_COVERAGE: ${{ (matrix.concretizer == 'original' && matrix.python-version == '2.7') || (matrix.python-version == '3.10') }} UNIT_TEST_COVERAGE: ${{ (matrix.python-version == '3.10') }}
run: | run: |
share/spack/qa/run-unit-tests share/spack/qa/run-unit-tests
coverage combine -a coverage combine -a