Skip to content

CI

CI #2168

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
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 -l {0}
jobs:
test:
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ['ubuntu','macos']
python-version:
- "3.11"
- "3.10"
- "3.9"
env:
OPENMM: ${{ matrix.cfg.openmm }}
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
steps:
- uses: actions/checkout@v3
- name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/espaloma.yaml
cache-environment: true
cache-downloads: true
cache-environment-key: environment-${{ steps.date.outputs.date }}
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
create-args: >-
python=${{ matrix.python-version }}
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Environment Information
run: |
micromamba info
micromamba list
micromamba --version
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Run tests
run: |
pytest -v --cov=espaloma --cov-report=xml --color=yes espaloma/
- name: CodeCov
uses: codecov/codecov-action@v3
if: ${{ github.repository == 'choderalab/espaloma'
&& github.event_name == 'pull_request' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
yml: ./.codecov.yml
fail_ci_if_error: False
verbose: True