Skip to content

CI

CI #102

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
# Nightly tests run on master by default:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * *"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.os }}, py-${{ matrix.python-version }}, OpenMM-${{ matrix.openmm }}, pymbar-${{ matrix.pymbar-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
openmm: ["7.7", "8.0"]
os: [macOS-latest, ubuntu-latest]
pymbar-version: ["4"]
include:
# Test openmm dev build on newest python + linux
- openmm: "dev"
python-version: "3.10"
os: ubuntu-latest
pymbar-version: "4"
# Test newest python, openmm, and pymbar we support on windows
- openmm: "8.0"
python-version: "3.10"
os: windows-latest
pymbar-version: "4"
# Have one job test pymbar 3 support
- openmm: "8.0"
python-version: "3.10"
os: ubuntu-latest
pymbar-version: "3"
exclude:
# There are no py 3.10 builds of openmm 7.7
- openmm: "7.7"
python-version: "3.10"
steps:
- uses: actions/checkout@v3
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Setup micromamba for openmm dev
uses: mamba-org/provision-with-micromamba@main
if: ${{ matrix.openmm == 'dev' }}
with:
channels: jaimergp/label/unsupported-cudatoolkit-shim,conda-forge/label/openmm_dev/linux-64,conda-forge
environment-file: devtools/conda-envs/test_env.yaml
channel-priority: flexible
environment-name: openmmtools-test
extra-specs: |
python==${{ matrix.python-version }}
openmm==8.0.0dev3
pymbar==${{ matrix.pymbar-version }}.*
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@main
if: ${{ matrix.openmm != 'dev' }}
with:
channels: jaimergp/label/unsupported-cudatoolkit-shim,conda-forge
environment-file: devtools/conda-envs/test_env.yaml
channel-priority: strict
environment-name: openmmtools-test
extra-specs: |
python==${{ matrix.python-version }}
openmm==${{ matrix.openmm }}
pymbar==${{ matrix.pymbar-version }}.*
- name: Install package
shell: bash -l {0}
run: |
python -m pip install . --no-deps
micromamba list
micromamba info
- name: Run tests
shell: bash -l {0}
run: |
# pytest -v --cov=openmmtools --cov-report=xml --color=yes openmmtools/tests/
nosetests openmmtools/tests --nocapture --cover-tests --with-coverage --cover-package=openmmtools --cover-xml --cover-xml-file=coverage.xml --verbosity=2 --with-timer --with-doctest -a '!slow'
- name: CodeCov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}-openmm-${{ matrix.openmm }}