diff --git a/.github/workflows/python-package.macos.yml b/.github/workflows/python-package.macos.yml index f7da7217..6ced5a65 100644 --- a/.github/workflows/python-package.macos.yml +++ b/.github/workflows/python-package.macos.yml @@ -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: