@@ -23,20 +23,33 @@ defaults:
23
23
shell : bash -l {0}
24
24
25
25
jobs :
26
+ environment-config :
27
+ runs-on : ubuntu-latest
28
+ outputs :
29
+ stable-python-version : ${{ steps.get-compatible-python.outputs.stable-python }}
30
+ python-matrix : ${{ steps.get-compatible-python.outputs.python-versions }}
31
+ steps :
32
+ - uses : actions/setup-python@v5.3.0
33
+ with :
34
+ python-version : " 3.11"
35
+
36
+ - id : get-compatible-python
37
+ uses : MDAnalysis/mdanalysis-compatible-python@main
38
+ with :
39
+ release : " latest"
40
+
26
41
main-tests :
27
42
if : " github.repository == 'becksteinlab/basicrta'"
43
+ needs : environment-config
28
44
runs-on : ${{ matrix.os }}
29
45
strategy :
30
46
fail-fast : false
31
47
matrix :
32
48
os : [macOS-latest, ubuntu-latest, windows-latest]
33
- python-version : ["3.10", "3.11", "3.12"]
49
+ python-version : ${{ fromJSON(needs.environment-config.outputs.python-matrix) }}
34
50
mdanalysis-version : ["latest", "develop"]
35
- # Manually exclude any combinations of the test matrix that can't be run
36
51
exclude :
37
- # The latest release of MDANalysis only supports up to Python 3.11
38
- # so we exclude 3.12 from the test matrix (issue #20)
39
- - python-version : " 3.12"
52
+ - python-version : " 3.9"
40
53
mdanalysis-version : " latest"
41
54
42
55
steps :
@@ -48,15 +61,17 @@ jobs:
48
61
df -h
49
62
ulimit -a
50
63
64
+
51
65
# More info on options: https://github.com/conda-incubator/setup-miniconda
52
66
- name : Install conda dependencies
53
67
uses : conda-incubator/setup-miniconda@v3
54
68
with :
55
69
python-version : ${{ matrix.python-version }}
56
70
environment-file : devtools/conda-envs/test_env.yaml
57
71
add-pip-as-python-dependency : true
72
+ # architecture: x64
58
73
59
- miniforge-variant : Mambaforge
74
+ miniforge-variant : Miniforge3
60
75
use-mamba : true
61
76
channels : conda-forge, defaults
62
77
65
80
auto-activate-base : false
66
81
show-channel-urls : true
67
82
83
+
68
84
- name : Install MDAnalysis version
69
85
uses : MDAnalysis/install-mdanalysis@main
70
86
with :
@@ -87,22 +103,23 @@ jobs:
87
103
conda info
88
104
conda list
89
105
106
+
90
107
- name : Run tests
91
108
run : |
92
- pytest -n auto -v --cov=basicrta --cov-report=xml --color=yes basicrta/tests/
109
+ pytest -n 2 -v --cov=basicrta --cov-report=xml --color=yes basicrta/tests/
93
110
94
111
- name : codecov
95
112
if : github.repository == 'becksteinlab/basicrta' && github.event_name != 'schedule'
96
- uses : codecov/codecov-action@v4
113
+ uses : codecov/codecov-action@v3
97
114
with :
98
115
file : coverage.xml
99
116
name : codecov-${{ matrix.os }}-py${{ matrix.python-version }}
100
- token : ${{ secrets.CODECOV_TOKEN }}
101
117
verbose : True
102
118
103
119
104
120
pylint_check :
105
121
if : " github.repository == 'becksteinlab/basicrta'"
122
+ needs : environment-config
106
123
runs-on : ubuntu-latest
107
124
108
125
steps :
@@ -111,7 +128,7 @@ jobs:
111
128
- name : Set up Python
112
129
uses : actions/setup-python@v4
113
130
with :
114
- python-version : " 3.11 "
131
+ python-version : ${{ needs.environment-config.outputs.stable-python-version }}
115
132
116
133
- name : Install Pylint
117
134
run : |
@@ -123,20 +140,21 @@ jobs:
123
140
env :
124
141
PYLINTRC : .pylintrc
125
142
run : |
126
- pylint basicrta
143
+ pylint basicrta --exit-zero
127
144
128
145
129
146
pypi_check :
130
147
if : " github.repository == 'becksteinlab/basicrta'"
148
+ needs : environment-config
131
149
runs-on : ubuntu-latest
132
150
133
151
steps :
134
152
- uses : actions/checkout@v4
135
153
136
- - name : Set up Python
154
+ - name : Set up Python ${{ needs.environment-config.outputs.stable-python-version }}
137
155
uses : actions/setup-python@v4
138
156
with :
139
- python-version : " 3.11 "
157
+ python-version : ${{ needs.environment-config.outputs.stable-python-version }}
140
158
141
159
- name : Install dependencies
142
160
run : |
0 commit comments