@@ -233,21 +233,13 @@ jobs:
233
233
steps :
234
234
- uses : actions/checkout@v3
235
235
236
- - name : setup_miniconda
237
- uses : conda-incubator/setup-miniconda@v2
236
+ - uses : actions/setup-python@v4
238
237
with :
239
238
python-version : 3.8
240
- auto-update-conda : true
241
- channel-priority : flexible
242
- channels : conda-forge
243
- add-pip-as-python-dependency : true
244
- architecture : x64
245
239
246
240
- name : install
247
241
run : |
248
- which pip
249
- which python
250
- pip install pylint
242
+ python -m pip install pylint
251
243
252
244
- name : pylint
253
245
env :
@@ -256,37 +248,67 @@ jobs:
256
248
pylint package/MDAnalysis && pylint testsuite/MDAnalysisTests
257
249
258
250
251
+ darker_lint :
252
+ if : " github.repository == 'MDAnalysis/mdanalysis'"
253
+ runs-on : ubuntu-latest
254
+ defaults :
255
+ run :
256
+ shell : bash
257
+
258
+ steps :
259
+ - uses : actions/checkout@v3
260
+ with :
261
+ fetch-depth : 0
262
+
263
+ - uses : actions/setup-python@v4
264
+ with :
265
+ python-version : 3.8
266
+
267
+ - name : darker main code
268
+
269
+ with :
270
+ version : " @master"
271
+ options : " --check --diff --color"
272
+ src : " ./package/MDAnalysis"
273
+ revision : " HEAD^"
274
+ lint : " flake8"
275
+
276
+ - name : darker test code
277
+
278
+ if : success() || failure()
279
+ with :
280
+ version : " @master"
281
+ options : " --check --diff --color"
282
+ src : " ./testsuite/MDAnalysisTests"
283
+ revision : " HEAD^"
284
+ lint : " flake8"
285
+
286
+
259
287
pypi_check :
260
288
if : " github.repository == 'MDAnalysis/mdanalysis'"
261
289
runs-on : ubuntu-latest
290
+ defaults :
291
+ run :
292
+ working-directory : ./package
262
293
263
294
steps :
264
295
- uses : actions/checkout@v3
265
296
266
- - name : setup_miniconda
267
- uses : conda-incubator/setup-miniconda@v2
297
+ - uses : actions/setup-python@v4
268
298
with :
269
299
python-version : 3.8
270
- auto-update-conda : true
271
- channel-priority : flexible
272
- channels : conda-forge
273
- add-pip-as-python-dependency : true
274
- # mamba not enabled as install longer than deps install
275
- architecture : x64
276
300
277
- - name : install_pip_conda
301
+ - name : install_deps
278
302
run : |
279
- # Issue 3612 - readme_renderer is outdated on conda-forge
280
- conda install setuptools cython numpy twine
281
- pip install "readme-renderer>=34.0"
303
+ python -m pip install twine "readme-renderer>=34.0"
282
304
283
- - name : install_mdanalysis
305
+ - name : build_sdist
284
306
run : |
285
- cd package && python setup.py sdist
307
+ pipx run build -- sdist
286
308
287
309
- name : check_package_build
288
310
run : |
289
- DISTRIBUTION=$(ls -t1 package/ dist/MDAnalysis-*.tar.gz | head -n 1)
290
- test -n "${DISTRIBUTION}" || { echo "no distribution package/ dist/MDAnalysis-*.tar.gz found"; exit 1; }
311
+ DISTRIBUTION=$(ls -t1 dist/MDAnalysis-*.tar.gz | head -n 1)
312
+ test -n "${DISTRIBUTION}" || { echo "no distribution dist/MDAnalysis-*.tar.gz found"; exit 1; }
291
313
echo "twine check $DISTRIBUTION"
292
314
twine check $DISTRIBUTION
0 commit comments