CI #2082
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" | |
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 | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
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.10", "3.11", "3.12"] | |
openmm: ["8.0", "8.1.1", "8.1.2"] | |
os: [macOS-latest, ubuntu-latest, macOS-12] | |
pymbar-version: ["4"] | |
include: | |
# 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: | |
# no py312 builds of openmm 8.0 | |
- openmm: "8.0" | |
python-version: "3.12" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Additional info about the build | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
- name: Setup micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: '2.0.0-0' | |
environment-file: devtools/conda-envs/test_env.yaml | |
environment-name: openmmtools-test | |
create-args: >- | |
python==${{ matrix.python-version }} | |
openmm==${{ matrix.openmm }} | |
pymbar==${{ matrix.pymbar-version }}.* | |
condarc: | | |
channels: | |
- conda-forge | |
- jaimergp/label/unsupported-cudatoolkit-shim | |
- name: Install package | |
run: | | |
python -m pip install -e . --no-deps | |
micromamba list | |
micromamba info | |
- name: Run tests | |
run: | | |
pytest -n logical -v --cov=openmmtools --cov-report=xml --cov-report=term --color=yes openmmtools/tests/ | |
- name: CodeCov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}-openmm-${{ matrix.openmm }}-pymbar-${{ matrix.pymbar-version }} | |
token: ${{ secrets.CODECOV_TOKEN }} |