Skip to content

Commit

Permalink
[python-package.yml] try to activate the conda base environment for p…
Browse files Browse the repository at this point in the history
…y37 only
  • Loading branch information
gph82 committed Jan 3, 2025
1 parent 3de8cec commit c7ac773
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,54 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Conditionally set up Conda for Python 3.7
### Python 3.7 block
- name: Conditionally set up conda for Python 3.7
if: ${{ matrix.python-version == '3.7' }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
- name: Install openmm via conda for only for python 3.7
- name: If Python is 3.7 install openmm via conda
if: ${{ matrix.python-version == '3.7' }}
run: conda install openmm -c conda-forge -y
shell: bash
- name: Install dependencies
- name: If Python is 3.7 install dependencies in conda base environment
if: ${{ matrix.python-version == '3.7' }}
run: |
source activate base
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-xdist
shell: bash
- name: If Python is 3.7 install package in conda base environment
if: ${{ matrix.python-version == '3.7' }}
run: |
source activate base
pip install --upgrade pip
pip install --upgrade setuptools
pip install -e .
pip freeze
shell: bash
- name: If Python is 3.7 test with pytest and coverage Linux 8 threads in conda base environment
if: ${{ matrix.python-version == '3.7' }}
run: |
source activate base
echo -e '[run]\nomit = *dihedrals.py,*contact_matrix.py' > .coveragerc
pytest -n 8 -vs --cov=./ --cov-report=xml --disable-warnings --cov-config=.coveragerc
shell: bash
#### End Python 3.7 block
- name: If Python != 3.7 install dependencies normally
if: ${{ matrix.python-version != '3.7' }}
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-xdist
- name: Install package
- name: If Python != 3.7 install package normaly
if: ${{ matrix.python-version != '3.7' }}
run: |
pip install --upgrade pip
pip install --upgrade setuptools
pip install -e .
pip freeze
- name: Test with pytest and coverage Linux 8 threads
- name: If Python != 3.7 test with pytest and coverage Linux 8 threads normally
if: ${{ matrix.python-version != '3.7' }}
run: |
echo -e '[run]\nomit = *dihedrals.py,*contact_matrix.py' > .coveragerc
pytest -n 8 -vs --cov=./ --cov-report=xml --disable-warnings --cov-config=.coveragerc
Expand Down

0 comments on commit c7ac773

Please sign in to comment.