Skip to content

Commit

Permalink
[python-package.macos] use py37 with conda
Browse files Browse the repository at this point in the history
  • Loading branch information
gph82 committed Jan 3, 2025
1 parent 7950b91 commit 23c2f72
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions .github/workflows/python-package.macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,54 @@ jobs:
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
- name: Install openmm via conda for only 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: 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: |
conda run --live-stream -n base python -m pip install --upgrade pip
conda run --live-stream -n base 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: |
conda run --live-stream -n base pip install --upgrade pip
conda run --live-stream -n base pip install --upgrade setuptools
conda run --live-stream -n base pip install -e .
conda run --live-stream -n base 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: |
echo -e '[run]\nomit = *dihedrals.py,*contact_matrix.py' > .coveragerc
conda run --live-stream --live-stream -n base pytest -n 8 -v -s --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 flake8 pytest pytest-cov pytest-xdist
- name: Install package
pip install pytest pytest-cov pytest-xdist
- 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 macos
continue-on-error: true
- 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 -vs --cov=./ --cov-report=xml --disable-warnings --cov-config=.coveragerc
pytest -n 8 -vs --cov=./ --cov-report=xml --disable-warnings --cov-config=.coveragerc
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down

0 comments on commit 23c2f72

Please sign in to comment.