-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (43 loc) · 1.39 KB
/
CI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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