-
Notifications
You must be signed in to change notification settings - Fork 10
101 lines (85 loc) · 2.67 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
89
90
91
92
93
94
95
96
97
98
99
100
101
name: CI
on:
# run once every Sunday at 5:55 UTC
schedule:
- cron: "55 5 * * 1"
push:
branches:
- "develop"
- "master"
pull_request:
branches:
- "develop"
concurrency:
group: "${{ github.ref }}-${{ github.head_ref }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# only test all GROMACS version on the latest
# Python to keep the testing matrix manageable and only use 1
# macos runners (latest GROMACS, latest Python)
os: [ubuntu-latest]
python-version: ["3.12"]
gromacs-version: ["4.6.5", "2018.6", "2020.6", "2021.1", "2022.4", "2023.1", "2024.3"]
include:
- os: ubuntu-latest
python-version: "3.10"
gromacs-version: "2024.3"
- os: ubuntu-latest
python-version: "3.11"
gromacs-version: "2024.3"
- os: macos-latest
python-version: "3.12"
gromacs-version: "2024.3"
env:
MPLBACKEND: agg
steps:
- uses: actions/checkout@v4
- name: mamba environment and package installation
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/test_env.yaml
condarc: |
channels:
- conda-forge
- bioconda
channel_priority: flexible
cache-downloads: true
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
- name: Python version information
run: |
python -c "import sys; print(sys.version)"
- name: micromamba environment information
run: |
micromamba info
micromamba list
- name: Install pybol (fixture staging tool)
run: |
python -m pip install pybol
- name: Install GROMACS (${{ matrix.gromacs-version }})
# include mdanalysis here AGAIN to work around micromamba removing mdanalysis
# while downgrading libxml2 (see issue #252)
run: |
micromamba install 'gromacs==${{ matrix.gromacs-version }}' pocl mdanalysis
- name: Install package (with no dependencies)
run: |
python -m pip install . --no-deps
- name: Run tests
run: |
pytest -v --durations=20 --cov=mdpow --cov-report=xml --color=yes ./mdpow/tests
- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
file: ./coverage.xml
fail_ci_if_error: true