1- name : CI
1+ name : ci
22
33on :
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
218jobs :
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 )
0 commit comments