Skip to content

Commit 82c40b1

Browse files
committed
Implement CI Pipeline:
- Updated CI.yaml to allow Github Actions to run: - tests - docs - pre-commit - Moved the tests directory to the root of the repository, mentioned in issue #40
1 parent baa50c5 commit 82c40b1

30 files changed

Lines changed: 48 additions & 226 deletions

.github/workflows/CI.yaml

Lines changed: 48 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,70 @@
1-
name: CI
1+
name: ci
22

33
on:
4-
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
5-
# Existing codes likely still have "master" as the primary branch
6-
# Both are tracked here to keep legacy and new codes working
74
push:
8-
branches:
9-
- "master"
10-
- "main"
5+
branches: [main]
116
pull_request:
12-
branches:
13-
- "master"
14-
- "main"
15-
schedule:
16-
# Nightly tests run on master by default:
17-
# Scheduled workflows run on the latest commit on the default or base branch.
18-
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
19-
- cron: "0 0 * * *"
207

218
jobs:
22-
test:
23-
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
24-
runs-on: ${{ matrix.os }}
9+
tests:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 30
2512
strategy:
2613
matrix:
27-
os: [macOS-latest, ubuntu-latest, windows-latest]
28-
python-version: ['3.9', '3.10']
29-
14+
python-version: ["3.11", "3.12", "3.13"]
15+
name: Run tests
3016
steps:
31-
- uses: actions/checkout@v1
32-
33-
- name: Additional info about the build
34-
shell: bash
35-
run: |
36-
uname -a
37-
df -h
38-
ulimit -a
39-
17+
- name: Checkout repo
18+
uses: actions/checkout@v4
4019

4120
- name: Set up Python ${{ matrix.python-version }}
42-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v5
4322
with:
4423
python-version: ${{ matrix.python-version }}
4524

46-
- name: Testing Dependencies
47-
shell: bash
48-
run: |
49-
python -m pip install -U pytest pytest-cov codecov
50-
51-
- name: Install package
52-
25+
- name: Install CodeEntropy and its testing dependencies
5326
shell: bash
54-
run: |
55-
python -m pip install .
56-
57-
58-
- name: Run tests
27+
run: pip install -e .[testing]
5928

29+
- name: Run test suite
6030
shell: bash
31+
run: pytest --cov CodeEntropy --cov-report term-missing --cov-append .
6132

62-
run: |
63-
pytest -v --cov=CodeEntropy --cov-report=xml --color=yes CodeEntropy/tests/
33+
- name: Coveralls GitHub Action
34+
uses: coverallsapp/github-action@v2.3.6
35+
with:
36+
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
6437

65-
- name: CodeCov
66-
uses: codecov/codecov-action@v1
38+
docs:
39+
runs-on: ubuntu-latest
40+
timeout-minutes: 15
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Set up Python 3.12
44+
uses: actions/setup-python@v5
6745
with:
68-
file: ./coverage.xml
69-
flags: unittests
70-
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
71-
72-
- name: Testing executable capped protein
73-
shell: bash
74-
if: runner.os != 'Windows'
46+
python-version: 3.12
47+
- name: Install python dependencies
7548
run: |
76-
CodeEntropyPoseidon -f "CodeEntropy/tests/data/poseidon_example.prmtop" "CodeEntropy/tests/data/poseidon_example.trr" -l "resname ARG" -b 0 -e 20 --wm --res --uatom --topog 2 --solwm --solres --soluatom --solContact
49+
pip install --upgrade pip
50+
pip install -e .[docs]
51+
- name: Build docs
52+
run: cd docs && make
7753

78-
- name: Testing executable lysozyme in water Multi-threading
79-
shell: bash
80-
if: runner.os == 'Linux'
81-
run: |
82-
CodeEntropyPoseidon -f "CodeEntropy/tests/data/1AKI_prod_60.tpr" "CodeEntropy/tests/data/1AKI_prod_60.trr" -l "protein" -b 2 -e 12 -d 2 -t 2 --wm --res --uatom --topog 3 --solwm --solres --soluatom --solContact
54+
pre-commit:
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 15
57+
steps:
58+
- uses: actions/checkout@v4
59+
- name: Set up Python 3.11
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: 3.11
63+
- name: Install python dependencies
64+
run: |
65+
pip install --upgrade pip
66+
pip install -e .[pre-commit,docs,testing]
67+
- name: Run pre-commit
68+
run: |
69+
pre-commit install
70+
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )

CodeEntropy/tests/data/Atom_level_res_data.csv

Lines changed: 0 additions & 9 deletions
This file was deleted.

CodeEntropy/tests/data/resid_contact_matrix_atomLevel.csv

Lines changed: 0 additions & 15 deletions
This file was deleted.

CodeEntropy/tests/data/resid_contact_matrix_residLevel_resname.csv

Lines changed: 0 additions & 7 deletions
This file was deleted.

CodeEntropy/tests/data/soluteVariables10.0EE_atomLevel.csv

Lines changed: 0 additions & 14 deletions
This file was deleted.

CodeEntropy/tests/data/soluteVariables10.0EE_moleculeLevel.csv

Lines changed: 0 additions & 14 deletions
This file was deleted.

CodeEntropy/tests/data/soluteVariables10.0EE_residLevel_resname.csv

Lines changed: 0 additions & 14 deletions
This file was deleted.

CodeEntropy/tests/data/soluteVariables10.0EE_soluteContacts.csv

Lines changed: 0 additions & 1 deletion
This file was deleted.

CodeEntropy/tests/data/solventVariables10.0EE_atomLevel.csv

Lines changed: 0 additions & 29 deletions
This file was deleted.

CodeEntropy/tests/data/solventVariables10.0EE_moleculeLevel.csv

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)