-
Notifications
You must be signed in to change notification settings - Fork 25
88 lines (76 loc) · 2.28 KB
/
CI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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