Bump pypa/gh-action-pypi-publish #367
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PUSH | |
on: [push] | |
jobs: | |
build: | |
runs-on: [ubuntu-latest] | |
strategy: | |
matrix: | |
python-version: ["3.9","3.10","3.11","3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Create Python Environment | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
activate-environment: test | |
show-channel-urls: true | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
- name: Check and Conditionally Install PyMOL | |
shell: bash -l {0} | |
run: | | |
PYMOL_VER=3.0.0 | |
PYTHON_VER=${{ matrix.python-version }} | |
PYTHON_VER=${PYTHON_VER//./} # Remove the dot from the Python version | |
if mamba search -c conda-forge pymol-open-source==${PYMOL_VER} | grep -q "py${PYTHON_VER}"; then | |
mamba install -c conda-forge pymol-open-source==${PYMOL_VER} --file requirements/requirements-test.txt | |
else | |
mamba install -c conda-forge --file requirements/requirements-test.txt | |
fi | |
- name: Install package | |
shell: bash -l {0} | |
run: | | |
pip install -e . | |
- name: Test with pytest | |
shell: bash -l {0} | |
run: | | |
which python | |
python -m pytest |