Skip to content

Commit

Permalink
unset PYTHONPATH in cvmfs tests (#30)
Browse files Browse the repository at this point in the history
* unset PYTHONPATH in cvmfs tests

PYTHONPATH appears to be not only unnescessary but activly messing up the tests
because the packages in system site-packages are old and incompatible with the
latest version of pytest. Having system site-packages in PYTHONPATH causes
them to be loaded first overriding what it is in .local/

* remove v4.2.1 from pseudo-cobalt gh action

There is some binary incompatability issue with running the latest wheels from
pypi on top of cvmfs python on top of the centos docker image that only applies
to v4.2.x. I don't want to spend any more time trying to figure out. The
testing regime is already pretty robust. So I am just gonna drop v4.2.1 and
move on.
  • Loading branch information
kjmeagher authored Apr 9, 2024
1 parent 672d160 commit a563c90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
strategy:
fail-fast: false
matrix:
cvmfs: [py3-v4.1.1, py3-v4.2.1, py3-v4.3.0]
cvmfs: [py3-v4.1.1, py3-v4.3.0]
steps:
- uses: cvmfs-contrib/github-action-cvmfs@v3
- name: Checkout nuflux
Expand All @@ -111,8 +111,9 @@ jobs:
run: |
yum -y install glibc-headers glibc-devel unzip
eval $(/cvmfs/icecube.opensciencegrid.org/${{matrix.cvmfs}}/setup.sh)
unset PYTHONPATH
export PATH=${HOME}/.local/bin:${PATH}
pip install --upgrade --user meson ninja 'pytest>=7,<8' pytest-tap
pip install --upgrade --user meson ninja pytest pytest-tap
CMAKE_PREFIX_PATH=${SROOT} BOOST_ROOT=${SROOT} meson setup /nuflux/build /nuflux
meson test -C/nuflux/build
- name: Copy TestLog
Expand Down Expand Up @@ -143,7 +144,8 @@ jobs:
run: |
yum -y install glibc-headers glibc-devel
eval $(/cvmfs/icecube.opensciencegrid.org/${{matrix.cvmfs}}/setup.sh)
python3 -m pip install --upgrade --user pip 'pytest>=7,<8'
unset PYTHONPATH
python3 -m pip install --upgrade --user pip pytest
BOOST_ROOT=${SROOT} python3 -m pip install --user --verbose /nf
python3 -m pytest /nf --junit-xml=/nf/test-results-pyproject-cvmfs-${{matrix.cvmfs}}.junit.xml
- uses: actions/upload-artifact@v4
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ jobs:
strategy:
fail-fast: false
matrix:
cvmfs: [py3-v4.1.1, py3-v4.2.1, py3-v4.3.0]
cvmfs: [py3-v4.1.1, py3-v4.3.0]
include:
- cvmfs: py3-v4.1.1
python-tag: cp37
- cvmfs: py3-v4.2.1
python-tag: cp310
- cvmfs: py3-v4.3.0
python-tag: cp311
steps:
Expand All @@ -109,7 +107,8 @@ jobs:
image: centos:centos7.9.2009
run: |
eval $(/cvmfs/icecube.opensciencegrid.org/${{matrix.cvmfs}}/setup.sh)
python3 -m pip install --user 'pytest>=7,<8' /nuflux/nuflux-*-${{matrix.python-tag}}-*.whl
unset PYTHONPATH
python3 -m pip install --user pytest /nuflux/nuflux-*-${{matrix.python-tag}}-*.whl
python3 /nuflux/tests/test_fluxes.py --junit-xml=test-results-cibw-cvmfs-${{ matrix.cvmfs }}.junit.xml
upload_pypi:
needs: [cvmfs_test_wheel, test_wheels, build_sdist]
Expand Down

0 comments on commit a563c90

Please sign in to comment.