feat: Advanced Sampling Techniques Integration #237
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: CI | |
on: | |
push: | |
branches: [main, feature/*] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.13' | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
swig \ | |
cmake \ | |
libopenmm-dev \ | |
dssp \ | |
build-essential \ | |
curl \ | |
git \ | |
python3-dev \ | |
gcc \ | |
gfortran \ | |
libblas-dev \ | |
liblapack-dev \ | |
libhdf5-dev \ | |
libnetcdf-dev | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pytest-cov | |
# Install build dependencies first | |
pip install setuptools wheel Cython==0.29.36 | |
# Install mdtraj dependencies | |
pip install numpy==1.23.5 scipy==1.9.3 | |
# Install mdtraj from binary | |
pip install --only-binary :all: mdtraj==1.10.0 | |
# Install remaining requirements | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
cd tests | |
python -m pytest \ | |
test_dynamics.py \ | |
test_mutation_analysis.py \ | |
-v --cov=../models | |
- name: Check code style | |
run: | | |
pip install flake8 | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 . --count --exit-zero --max-complexity=10 \ | |
--max-line-length=80 --statistics | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.13' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install build wheel | |
- name: Build package | |
run: | | |
python -m build | |
python setup.py bdist_wheel | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist/ |