CI #1978
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: | |
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 | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: devtools/conda-envs/espaloma.yaml | |
cache-environment: true | |
cache-downloads: true | |
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 |