Clean unit-test workflow file (#33945)

Delete statements related to Python 2.7, and avoid installing
patchelf since now we can bootstrap it.
This commit is contained in:
Massimiliano Culpo 2022-11-16 23:28:49 +01:00 committed by GitHub
parent 067976f4b8
commit e47beceb8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,20 +59,11 @@ jobs:
# Needed for unit tests # Needed for unit tests
sudo apt-get -y install \ sudo apt-get -y install \
coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \ coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \
patchelf cmake bison libbison-dev kcov 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-xdist pip install --upgrade pip six setuptools pytest codecov[toml] pytest-xdist pytest-cov
# Install pytest-cov only on recent Python, to avoid stalling on Python 2.7 due pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click" "black"
# to bugs on an unmaintained version of the package when used with xdist.
if [[ ${{ matrix.python-version }} != "2.7" ]]; then
pip install --upgrade pytest-cov
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
pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click==8.0.4" "black<=21.12b0"
fi
- 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.
@ -85,6 +76,7 @@ jobs:
run: | run: |
. share/spack/setup-env.sh . share/spack/setup-env.sh
spack bootstrap disable spack-install spack bootstrap disable spack-install
spack bootstrap now
spack -v solve zlib spack -v solve zlib
- name: Run unit tests - name: Run unit tests
env: env:
@ -168,10 +160,7 @@ jobs:
- name: Install System packages - name: Install System packages
run: | run: |
sudo apt-get -y update sudo apt-get -y update
# Needed for unit tests sudo apt-get -y install coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build kcov
sudo apt-get -y install \
coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \
patchelf kcov
- name: Install Python packages - name: Install Python packages
run: | run: |
pip install --upgrade pip six setuptools pytest codecov coverage[toml] pytest-cov clingo pytest-xdist pip install --upgrade pip six setuptools pytest codecov coverage[toml] pytest-cov clingo pytest-xdist