Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix CI for python package #169

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/test_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,20 @@ jobs:
with:
submodules: recursive

- name: Update pip and setup venv
- name: Setup venv
run: |
python3 -m pip install --upgrade pip
python3 -m venv ~/env

- name: Build and install ghex
run: |
. ~/env/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r ./bindings/python/requirements-test.txt # before ghex installation to avoid mpi4py version conflict
python3 -m pip install -v ./bindings/python

- if: ${{ matrix.config.run == 'ON' }}
name: Install pytest etc
run: |
. ~/env/bin/activate
python3 -m pip install -r ./bindings/python/requirements-test.txt

- if: ${{ matrix.config.run == 'ON' }}
name: Run Python tests
run: |
. ~/env/bin/activate
python3 -m pytest -s ./test/bindings/python/
mpirun --oversubscribe -np 4 python3 -m pytest -s --with-mpi ./test/bindings/python/

2 changes: 1 addition & 1 deletion bindings/python/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# pip-compile --annotation-style=line --extra=test --output-file=requirements-test.txt pyproject.toml
#
iniconfig==2.0.0 # via pytest
mpi4py==3.1.5 # via ghex (pyproject.toml)
mpi4py==4.0.1 # via ghex (pyproject.toml)
numpy==1.26.2 # via ghex (pyproject.toml)
packaging==23.2 # via pytest
pluggy==1.3.0 # via pytest
Expand Down
Loading