Skip to content

Commit

Permalink
ci: try a simple ci.yaml (#272)
Browse files Browse the repository at this point in the history
* ci: try a simple ci.yaml
* install GROMACS and testing package together with package dependencies: allows use of a single env yaml file
* add tests and comments to check that correct Python and GROMACS versions are installed
  • Loading branch information
jandom authored Nov 20, 2023
1 parent 9ecbdea commit 463820c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: micromamba environment and package installation (Python ${{ matrix.python-version }})
- name: micromamba package and testing environment installation (Python ${{ matrix.python-version }}, GROMACS ${{ matrix.gromacs-version }})
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/conda-envs/test_env.yaml
Expand All @@ -83,6 +83,7 @@ jobs:
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}.*=*_cpython
gromacs==${{ matrix.gromacs-version }}
- name: Python version information ${{ matrix.python-version }}
run: |
Expand All @@ -93,17 +94,8 @@ jobs:
micromamba info
micromamba list
cat /proc/cpuinfo || (/usr/sbin/system_profiler SPHardwareDataType; /usr/sbin/sysctl -a | grep machdep.cpu)
- name: Install pytest and plugins
run: |
micromamba install pytest pytest-pep8 pytest-cov codecov
- name: Install GROMACS (${{ matrix.gromacs-version }})
# UGLY HACK/FIX (probably to issues with bioconda packages)
# - For 3.9, micromamba insists on using pypy 3.9 (and --py-pin does not help).
# We can't freeze because then it's not possible to install older GROMACS versions from bioconda.
run: |
micromamba install 'gromacs==${{ matrix.gromacs-version }}' pocl numkit python=${{ matrix.python-version }}.*=*_cpython
micromamba list | grep gromacs | grep ${{ matrix.gromacs-version }}
micromamba list | grep python | grep ${{ matrix.python-version }}
- name: Install package (with no dependencies)
run: |
Expand Down
14 changes: 10 additions & 4 deletions ci/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: test
# it is important to install gromacs together with everything else to ensure correct dependency resolution
name: gromacs_wrapper
channels:
- conda-forge
dependencies:
- python
- numpy>=1.0
- matplotlib
- pandas>=0.17
- numkit>=1.0
- numpy>=1.0
- pandas>=0.17
- pocl
- setuptools
# dev tools
- codecov
- pytest
- pytest-cov
- pytest-pep8

0 comments on commit 463820c

Please sign in to comment.