Skip to content

Commit

Permalink
removed conda from ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilo9999 committed Jun 12, 2024
1 parent ab74e65 commit c05a59f
Showing 1 changed file with 49 additions and 15 deletions.
64 changes: 49 additions & 15 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8, 3.9]
os: [ubuntu-24.04,macos-14]
python-version: [3.8,3.9]

steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: cp310
with:
python-version: ${{ matrix.python-version }}
fetch-depth: 2
- name: Install ubuntu dependencies
shell: bash -el {0}
run: |
Expand All @@ -30,24 +30,58 @@ jobs:
sudo apt-get update
sudo apt-get install libopenmpi-dev openmpi-bin
fi;
- name: Install MacOs dependencies
shell: bash -el {0}
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
brew install open-mpi
fi;
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
conda install --yes -c conda-forge mpi4py openmpi
'${{ steps.cp310.outputs.python-path }}' -m pip install --upgrade pip
'${{ steps.cp310.outputs.python-path }}' -m pip install mpi4py openmpi
- name: Check MPI version
shell: bash -el {0}
run: |
mpiexec --version
- name: Check Python version
shell: bash -el {0}
run: |
'${{ steps.cp310.outputs.python-path }}' --version
- name: Install HNN-core
shell: bash -el {0}
run: |
pip install --verbose '.[opt, parallel, test, gui]'
- name: Lint with flake8
'${{ steps.cp310.outputs.python-path }}' -m pip install --verbose '.[opt, parallel, test, gui]'
- name: Set Env Variables
shell: bash -el {0}
run: |
flake8 --count hnn_core
- name: Test with pytest
if [ "${{ matrix.os }}" == "macos-latest" ]; then
echo "List /opt/homebrew/lib"
ls /opt/homebrew/lib
echo "MPI_LIB_NRN_PATH=/opt/homebrew/lib/libmpi.dylib" >> $GITHUB_ENV
fi;
# - name: Run MPI application
# shell: bash -el {0}
# run: |
# mpiexec -np 2 '${{ steps.cp310.outputs.python-path }}' ./hnn_core/mpi_test.py
- name: Verify NEURON installation
shell: bash -el {0}
run: |
python -m pytest ./hnn_core/tests/ --cov=hnn_core --cov-report=xml
- name: Upload coverage to Codecov
nrniv -python -nobanner -mpi '${{ steps.cp310.outputs.python-path }}' "from neuron import h; print(h)"
# - name: Run MPI application with NEURON
# shell: bash -el {0}
# run: |
# mpiexec -np 2 -verbose nrniv -python -mpi -nobanner '${{ steps.cp310.outputs.python-path }}' ./hnn_core/mpi_test.py
# - name: Lint with flake8
# shell: bash -el {0}
# run: |
# flake8 --count hnn_core
- name: Test with pytest
shell: bash -el {0}
run: |
bash <(curl -s https://codecov.io/bash) -f ./coverage.xml
'${{ steps.cp310.outputs.python-path }}' -m pytest ./hnn_core/tests/ --cov=hnn_core --cov-report=xml
# - name: Upload coverage to Codecov
# shell: bash -el {0}
# run: |
# bash <(curl -s https://codecov.io/bash) -f ./coverage.xml

0 comments on commit c05a59f

Please sign in to comment.