Skip to content

Commit 1407b7b

Browse files
steven ayoubsteven ayoub
authored andcommitted
Created GitHub Action that runs tests on push and pull requests
1 parent 3bdd4fd commit 1407b7b

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

.github/workflows/CI.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: BLUES GitHub Actions
2+
3+
on:
4+
push:
5+
branches:
6+
- "**" # trigger on push to any branch
7+
pull_request:
8+
branches:
9+
- "**" # trigger on PR to any branch
10+
jobs:
11+
test:
12+
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest]
17+
python-version: ["3.10"]
18+
# solver: ["libmamba"]
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Additional info about the build
23+
shell: bash
24+
run: |
25+
uname -a
26+
df -h
27+
ulimit -a
28+
29+
# More info on options: https://github.com/marketplace/actions/setup-micromamba
30+
- uses: conda-incubator/setup-miniconda@v3
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
environment-file: devtools/conda-envs/test_env.yaml
34+
condarc: |
35+
channels:
36+
- conda-forge
37+
- defaults
38+
- omnia
39+
40+
41+
- name: Install package
42+
43+
# conda setup requires this special shell
44+
shell: bash -l {0}
45+
run: |
46+
python setup.py sdist
47+
pip install dist/*
48+
49+
50+
- name: Run tests
51+
52+
# conda setup requires this special shell
53+
shell: bash -l {0}
54+
55+
run: |
56+
pytest -v --cov=blues --cov-report=xml --color=yes blues/tests/test_propane.py blues/tests/test_randomrotation.py blues/tests/test_sidechain.py blues/tests/test_randomrotation.py blues/tests/test_watertranslation.py
57+
58+
- name: CodeCov
59+
uses: codecov/codecov-action@v4
60+
with:
61+
file: ./coverage.xml
62+
flags: unittests
63+
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}

devtools/conda-envs/test_env.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: blues
2+
channels:
3+
- omnia
4+
- openeye
5+
- conda-forge
6+
- defaults
7+
dependencies:
8+
- python==3.11
9+
- oeommtools
10+
- openeye-toolkits
11+
- cython
12+
- numpy
13+
- openmm
14+
- openmmtools
15+
- ipython
16+
- ipykernel
17+
- conda-forge::openff-toolkit
18+
- parmed
19+
prefix: /opt/miniconda3/envs/blues

0 commit comments

Comments
 (0)