-
Notifications
You must be signed in to change notification settings - Fork 1
621 lines (565 loc) · 27.1 KB
/
Copy pathintegration_tests.yml
File metadata and controls
621 lines (565 loc) · 27.1 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
name: Integration tests
on:
workflow_call:
inputs:
EXTENSIONS:
description: 'The list of extension to test.'
default: 'exspy holospy lumispy hyperspy-gui-ipywidgets hyperspy-gui-traitsui'
type: string
EXTENSION_VERSION:
description: 'The version of the extension to test. It can be "release" or "dev".'
default: 'release'
type: string
HYPERSPY_VERSION:
description: 'The version of the hyperspy to test. It can be "release", "RnM" or "RnP".'
default: 'release'
type: string
ROSETTASCIIO_VERSION:
description: 'The version of the rosettasciio to test. It can be "release" or "dev".'
default: 'release'
type: string
INSTALL_SOURCE_FROM_REPOSITORY:
description: 'Whether to install the source code of the current repository.'
default: true
type: boolean
USE_CONDA:
description: 'Whether to use conda to install the packages. Set to "false" to use pip.'
default: false
type: boolean
ADDITIONAL_PACKAGES:
description: 'List of additional packages to install.'
default: ''
type: string
NUMBA_DEV:
description: 'Whether to install the numba development version.'
default: false
type: boolean
DEPENDENCIES_PRE_RELEASE:
description: 'List of dependencies to install pre-release installed with packages from pypi.org.'
default: '' # e.g. matplotlib scipy scikit-learn sympy h5py scikit-image numba
type: string
DEPENDENCIES_DEV:
# Dev version from https://anaconda.org/scientific-python-nightly-wheels/
description: 'List of dependencies to install from scientific-python-nightly-wheels.'
default: '' # e.g. matplotlib scipy scikit-learn sympy h5py scikit-image
type: string
PLATFORM:
description: 'The platform to run the tests on.'
default: 'ubuntu-latest'
type: string
PIP_EXTRAS:
description: 'Optional “variants” (also called extra) to be installed for the source of the current repository'
# if empty string, no argument is passed
default: ''
type: string
CACHE_POOCH:
description: |
'The list of pooch cache to cache - see pooch.os_cache() for more information.'
'For library using `pooch.retrieve()`, `pooch` needs to be added, because the default pooch cache folder is used.'
default: 'kikuchipy pyxem'
type: string
CACHE_POOCH_LABEL:
description: 'A label to add to the pooch cache key.'
default: 'pooch'
type: string
RSCIIO_CACHE_POOCH_LABEL:
description: |
'The label to retrieve the RosettaSciIO test data cache - only used when `ROSETTASCIIO_VERSION` is "release".'
'The output of the `download_rsciio_test_data.yml` reusable workflow should be passed to this input to get the correct cache.'
default: ''
type: string
PYTEST_ARGS:
description: 'Additional arguments to pass to pytest.
If not provided, defaults to "--reruns 3 -n <number_of_cpus>".'
default: ''
type: string
PYTHON_VERSION:
description: 'The Python version to use for the tests.'
default: '3.12'
type: string
TEST_DEPS:
description: 'The test dependencies to install.'
default: '"pytest<9" pytest-xdist pytest-rerunfailures pytest-instafail pytest-mpl filelock'
type: string
LABEL:
description: 'A label to add to the job name.'
default: ''
type: string
REPORT_FAILURE_AS_ISSUE:
description: 'Whether to create a GitHub issue from pytest logs on failure. Needs issue write permissions.'
default: false
type: boolean
jobs:
integration_test:
name: ${{ inputs.PLATFORM }} py${{ inputs.PYTHON_VERSION }} ${{ inputs.LABEL }}
runs-on: ${{ inputs.PLATFORM }}
defaults:
run:
shell: bash -el {0}
env:
MPLBACKEND: agg
PYTEST_ARGS: ${{ inputs.PYTEST_ARGS }}
RSCIIO_CACHE_POOCH_LABEL: ${{ inputs.RSCIIO_CACHE_POOCH_LABEL }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Get repository name
run: |
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: Fetch tags upstream
if: ${{ github.repository_owner != 'hyperspy' }}
run: |
git remote add upstream https://github.com/hyperspy/${{ env.REPOSITORY_NAME }}.git
git fetch upstream --tags
- uses: conda-incubator/setup-miniconda@v3.3.0
with:
miniforge-version: latest
python-version: ${{ inputs.PYTHON_VERSION }}
activate-environment: "test"
conda-remove-defaults: "true"
- name: Install pip
run: |
conda install pip
- name: Cache pip
uses: actions/cache@v5
env:
# Increase this value to reset cache
CACHE_NUMBER: 0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-integration-pip-${{ env.CACHE_NUMBER }}
restore-keys: |
${{ runner.os }}-integration-pip-${{ env.CACHE_NUMBER }}
- name: Cache conda
if: ${{ inputs.USE_CONDA }}
uses: actions/cache@v5
env:
# Increase this value to reset cache
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-integration-conda-${{ env.CACHE_NUMBER }}
restore-keys: |
${{ runner.os }}-integration-conda-${{ env.CACHE_NUMBER }}
- name: Conda info
run: |
conda info
conda list
- name: Install test dependencies
run: |
if [[ "${{ inputs.USE_CONDA }}" == "true" ]]; then
conda install ${{ inputs.TEST_DEPS }} pytest-reportlog
else
pip install ${{ inputs.TEST_DEPS }} pytest-reportlog
fi
- name: Install numba development version
if: ${{ inputs.NUMBA_DEV }}
run: |
mamba install -c numba/label/dev numba
- name: Install dependencies pre-release version
if: ${{ inputs.DEPENDENCIES_PRE_RELEASE }}
run: |
pip install --upgrade --pre ${{ inputs.DEPENDENCIES_PRE_RELEASE }}
- name: Install dependencies development version
if: ${{ inputs.DEPENDENCIES_DEV }}
run: |
pip install --upgrade --pre --extra-index-url \
https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
${{ inputs.DEPENDENCIES_DEV }}
- name: Get the number of CPUs
id: cpus
run: |
import os, platform
num_cpus = os.cpu_count() - 1 # keep one CPU free for testing multiprocessing
print(f"Number of CPU: {num_cpus}")
print(f"Architecture: {platform.machine()}")
output_file = os.environ["GITHUB_OUTPUT"]
with open(output_file, "a", encoding="utf-8") as output_stream:
output_stream.write(f"count={num_cpus}\n")
shell: python
- name: Set pytest options
if: ${{ env.PYTEST_ARGS == '' }}
run: |
# it shouldn't be necessary to set `--dist=loadfile` because it should already
# set as default in the pytest configuration, but it doesn't seem to work...
if [[ "${{ env.PYTEST_ARGS }}" == "true" ]]; then
PYTEST_ARGS="--reruns 3 -n ${{ steps.cpus.outputs.count }} --dist=loadfile"
fi
PYTEST_LOG_ARGS="--report-log=${{ runner.temp }}/pytest-log.jsonl"
echo "PYTEST_ARGS=${PYTEST_ARGS}" >> $GITHUB_ENV
echo "PYTEST_LOG_ARGS=${PYTEST_LOG_ARGS}" >> $GITHUB_ENV
- name: Install astra-toolbox and test dependencies
if: ${{ contains(inputs.EXTENSIONS, 'etspy') }}
run: |
# astra-toolbox is an etspy dependency
# install ffmpeg until test is skipped if not installed
conda install astra-toolbox ffmpeg
- name: Install extensions (release)
if: ${{ contains(inputs.EXTENSION_VERSION, 'release') }}
run: |
if [[ "${{ inputs.USE_CONDA }}" == "true" ]]; then
libraries="${{ inputs.EXTENSIONS }}"
# Replace kikuchipy with kikuchipy-base for conda installation
libraries=$(echo "$libraries" | sed 's/kikuchipy/kikuchipy-base/g')
echo $libraries
conda install $libraries
else
pip install ${{ inputs.EXTENSIONS }}
fi
- name: Install additional packages
if: ${{ inputs.ADDITIONAL_PACKAGES != '' }}
run: |
if [[ "${{ inputs.USE_CONDA }}" == "true" ]]; then
conda install ${{ inputs.ADDITIONAL_PACKAGES }}
else
pip install ${{ inputs.ADDITIONAL_PACKAGES }}
fi
- name: Conda list
run: |
conda list
- name: Install HyperSpy (${{ inputs.HYPERSPY_VERSION }})
if: ${{ env.REPOSITORY_NAME != 'hyperspy' }}
run: |
if [[ "${{ inputs.HYPERSPY_VERSION }}" == "release" ]]; then
if [[ "${{ inputs.USE_CONDA }}" == "true" ]]; then
conda install hyperspy
else
pip install "hyperspy[all]"
fi
elif [[ "${{ inputs.HYPERSPY_VERSION }}" == "RnM" ]]; then
pip install "hyperspy[all] @ git+https://github.com/hyperspy/hyperspy.git@RELEASE_next_minor"
elif [[ "${{ inputs.HYPERSPY_VERSION }}" == "RnP" ]]; then
pip install "hyperspy[all] @ git+https://github.com/hyperspy/hyperspy.git@RELEASE_next_patch"
else
echo "Unknown HYPERSPY_VERSION: ${{ inputs.HYPERSPY_VERSION }}"
exit 1
fi
- name: Install RosettaSciIO (${{ inputs.ROSETTASCIIO_VERSION }})
if: ${{ env.REPOSITORY_NAME != 'rosettasciio' }}
run: |
if [[ "${{ inputs.ROSETTASCIIO_VERSION }}" == "release" ]]; then
if [[ "${{ inputs.USE_CONDA }}" == "true" ]]; then
conda install rosettasciio
else
pip install "rosettasciio[all]"
fi
elif [[ "${{ inputs.ROSETTASCIIO_VERSION }}" == "dev" ]]; then
pip install "rosettasciio[all] @ git+https://github.com/hyperspy/rosettasciio.git"
else
echo "Unknown ROSETTASCIIO_VERSION: ${{ inputs.ROSETTASCIIO_VERSION }}"
exit 1
fi
- name: Install Extension (dev)
if: ${{ inputs.EXTENSION_VERSION == 'dev' }}
run: |
for ext in $(echo "${{ inputs.EXTENSIONS }}" | tr ' ' '\n'); do
if [[ "$ext" == "exspy" && "${{ env.REPOSITORY_NAME }}" != "exspy" ]]; then
# workaround for zenodo rate limits
# https://github.com/hyperspy/exspy/pull/156
# pip install "exspy @ git+https://github.com/hyperspy/exspy.git"
pip install "exspy @ git+https://github.com/ericpre/exspy.git@rate_limit_zenodo"
elif [[ "$ext" == "holospy" && "${{ env.REPOSITORY_NAME }}" != "holospy" ]]; then
pip install "holospy @ git+https://github.com/hyperspy/holospy.git"
elif [[ "$ext" == "hyperspy-gui-ipywidgets" && "${{ env.REPOSITORY_NAME }}" != "hyperspy_gui_ipywidgets" ]]; then
pip install "hyperspy-gui-ipywidgets @ git+https://github.com/hyperspy/hyperspy_gui_ipywidgets.git"
elif [[ "$ext" == "hyperspy-gui-traitsui" && "${{ env.REPOSITORY_NAME }}" != "hyperspy_gui_traitsui" ]]; then
pip install "hyperspy-gui-traitsui @ git+https://github.com/hyperspy/hyperspy_gui_traitsui.git"
elif [[ "$ext" == "lumispy" && "${{ env.REPOSITORY_NAME }}" != "lumispy" ]]; then
pip install "lumispy @ git+https://github.com/lumispy/lumispy.git"
elif [[ "$ext" == "pyxem" && "${{ env.REPOSITORY_NAME }}" != "pyxem" ]]; then
pip install "pyxem @ git+https://github.com/pyxem/pyxem.git"
elif [[ "$ext" == "kikuchipy" && "${{ env.REPOSITORY_NAME }}" != "kikuchipy" ]]; then
pip install "kikuchipy @ git+https://github.com/pyxem/kikuchipy.git"
elif [[ "$ext" == "atomap" && "${{ env.REPOSITORY_NAME }}" != "atomap" ]]; then
pip install "atomap @ git+https://github.com/atomap-dev/atomap.git"
elif [[ "$ext" == "etspy" && "${{ env.REPOSITORY_NAME }}" != "etspy" ]]; then
pip install "etspy @ git+https://github.com/usnistgov/etspy.git"
else
echo "Unknown extension: $ext"
exit 1
fi
done
- name: Conda list
run: |
conda list
- name: Install ${{ env.REPOSITORY_NAME }} (local)
if: ${{ inputs.INSTALL_SOURCE_FROM_REPOSITORY }}
working-directory: ${{ github.workspace }}
run: |
pip install -e .${{ inputs.PIP_EXTRAS }}
- name: Install pooch
if: ${{ inputs.CACHE_POOCH != '' }}
run: |
if [[ "${{ inputs.USE_CONDA }}" == "true" ]]; then
conda install pooch
else
pip install pooch
fi
- name: Get pooch cache paths
if: ${{ inputs.CACHE_POOCH != '' }}
run: |
# create list of pooch cache paths as a string (space separated)
python -c "import pooch; print(' '.join([str(pooch.os_cache(s)) for s in '${{ inputs.CACHE_POOCH }}'.split(' ')]))" > pooch_cache_paths.txt
echo "POOCH_CACHE_PATHS=$(cat pooch_cache_paths.txt)" >> $GITHUB_ENV
- name: Cache pooch data
if: ${{ always() && inputs.CACHE_POOCH != '' }}
uses: actions/cache@v5
env:
# Increase this value to reset cache
CACHE_NUMBER: 0
with:
path: ${{ env.POOCH_CACHE_PATHS }}
key: ${{ runner.os }}-${{ inputs.CACHE_POOCH_LABEL }}-${{ env.CACHE_NUMBER }}
restore-keys: |
${{ runner.os }}-${{ inputs.CACHE_POOCH_LABEL }}-${{ env.CACHE_NUMBER }}
- uses: ssciwr/pooch-cache@v1
if: ${{ contains(inputs.EXTENSIONS, 'exspy') || env.REPOSITORY_NAME == 'exspy' }}
with:
# to restore the pooch cache use for eXSpy for example
# Needs download_exspy_GOS.yml reusable workflow to be run before for the cache to be available
name: pooch
fail-on-cache-miss: true
- name: Set RSCIIO_CACHE_POOCH_LABEL environment variable
if: ${{ env.REPOSITORY_NAME != 'rosettasciio' && inputs.ROSETTASCIIO_VERSION == 'dev' }}
run: |
# overwrite the RSCIIO_CACHE_POOCH_LABEL to "main" to get the latest test data cache for the dev version of RosettaSciIO
echo "RSCIIO_CACHE_POOCH_LABEL=main" >> $GITHUB_ENV
- uses: ssciwr/pooch-cache@v1
if: ${{ env.REPOSITORY_NAME != 'rosettasciio' }}
with:
# to restore the RosettaSciIO test data cache
# Needs download_rsciio_test_data.yml reusable workflow to be run before for the cache to be available
name: rsciio-${{ env.RSCIIO_CACHE_POOCH_LABEL }}
fail-on-cache-miss: true
# Need https://github.com/hyperspy/rosettasciio/pull/482 to be released
# and remove the next step
# - name: Set RSCIIO_TEST_DATA_SOURCE environment variable
# if: ${{ env.REPOSITORY_NAME != 'rosettasciio' }}
# run: |
# # Get the value `RSCIIO_TEST_DATA_SOURCE` from the pooch cache path
# python -c "import pooch; print(f'RSCIIO_TEST_DATA_SOURCE={str(pooch.os_cache(\"rsciio-${{ env.RSCIIO_CACHE_POOCH_LABEL }}\"))}')" >> $GITHUB_ENV
- name: Copy RosettaSciIO test data from pooch cache
if: ${{ env.REPOSITORY_NAME != 'rosettasciio' }}
run: |
python -c "
import importlib.util, os, shutil, sys
from pathlib import Path
import pooch
src = pooch.os_cache('rsciio-${{ env.RSCIIO_CACHE_POOCH_LABEL }}')
dest = Path(importlib.util.find_spec('rsciio').origin).parent / 'tests' / 'data'
print(f'Copying from {src} to {dest}')
shutil.copytree(str(src), str(dest), dirs_exist_ok=True)
print(os.listdir(dest))
"
- name: Conda list
run: |
conda list
- name: Run HyperSpy Test Suite
if: ${{ always() }}
working-directory: ${{ runner.temp }}
id: hyperspy_tests
run: |
# https://github.com/hyperspy/hyperspy/issues/3536
# Fixed in https://github.com/hyperspy/hyperspy/pull/3554
# skip test_missing_analytical_gradient and test_EELSModel_saving until exspy is released with the "_download_GOS_files" function
# https://github.com/hyperspy/hyperspy-extensions-list/issues/90
pytest --pyargs hyperspy ${{ env.PYTEST_ARGS }} ${{ env.PYTEST_LOG_ARGS }} -k "not test_arpack and not map_values_std_isset and not test_missing_analytical_gradient and not test_EELSModel_saving and not _units_error and not test_offset_as_quantity_setter_string_no_units"
- name: Report HyperSpy test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.hyperspy_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ HyperSpy test suite failed ⚠️
assignees: "ericpre,jlaehne,CSSFrancis"
- name: Run RosettaSciIO Test Suite
if: ${{ always() }}
working-directory: ${{ runner.temp }}
id: rosettasciio_tests
run: |
# mrcz doesn't support python 3.12 and above because of dependence on distutils
# https://github.com/em-MRCZ/python-mrcz/pull/16
# distutils is vendored in setuptools, which can be misleading
# pyusid doesn't support numpy 2
pytest --pyargs rsciio ${{ env.PYTEST_ARGS }} ${{ env.PYTEST_LOG_ARGS }} -k "not test_mrcz.py and not test_usid.py"
- name: Report RosettaSciIO test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.rosettasciio_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ RosettaSciIO test suite failed ⚠️
assignees: "ericpre,jlaehne,CSSFrancis"
- name: Run LumiSpy Test Suite
if: ${{ always() && contains(inputs.EXTENSIONS, 'lumispy') || env.REPOSITORY_NAME == 'lumispy' }}
working-directory: ${{ runner.temp }}
id: lumispy_tests
run: |
# https://github.com/hyperspy/hyperspy-extensions-list/issues/90
pytest --pyargs lumispy ${{ env.PYTEST_LOG_ARGS }} -k "not test_crop_edges_fancy_str"
- name: Report LumiSpy test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.lumispy_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ LumiSpy test suite failed ⚠️
assignees: "jlaehne"
- name: Run hyperspy_gui_ipywidgets Test Suite
if: ${{ always() && contains(inputs.EXTENSIONS, 'hyperspy-gui-ipywidgets') || env.REPOSITORY_NAME == 'hyperspy_gui_ipywidgets' }}
working-directory: ${{ runner.temp }}
id: hyperspy_gui_ipywidgets_tests
run: |
pytest --pyargs hyperspy_gui_ipywidgets ${{ env.PYTEST_LOG_ARGS }}
- name: Report hyperspy_gui_ipywidgets test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.hyperspy_gui_ipywidgets_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ hyperspy_gui_ipywidgets test suite failed ⚠️
assignees: "ericpre,jlaehne,CSSFrancis"
- name: Run hyperspy_gui_traitsui Test Suite
if: ${{ always() && contains(inputs.EXTENSIONS, 'hyperspy-gui-traitsui') || env.REPOSITORY_NAME == 'hyperspy_gui_traitsui' }}
working-directory: ${{ runner.temp }}
id: hyperspy_gui_traitsui_tests
run: |
pytest --pyargs hyperspy_gui_traitsui ${{ env.PYTEST_LOG_ARGS }}
- name: Report hyperspy_gui_traitsui test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.hyperspy_gui_traitsui_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ hyperspy_gui_traitsui test suite failed ⚠️
assignees: "ericpre,jlaehne,CSSFrancis"
- name: Run Pyxem Test Suite
if: ${{ always() && contains(inputs.EXTENSIONS, 'pyxem') || env.REPOSITORY_NAME == 'pyxem' }}
working-directory: ${{ runner.temp }}
id: pyxem_tests
run: |
# https://github.com/pyxem/pyxem/issues/1153
# https://github.com/pyxem/pyxem/issues/1174
# test_load_au_grating: skip to avoid hitting rate limits from zenodo
pytest --pyargs pyxem ${{ env.PYTEST_LOG_ARGS }} -k "not TestAddEllipseArrayAsMarkers and not test_ransac_ellipse_tools and not test_load_au_grating"
- name: Report Pyxem test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.pyxem_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ Pyxem test suite failed ⚠️
assignees: "CSSFrancis"
- name: Run holospy Test Suite
if: ${{ always() && contains(inputs.EXTENSIONS, 'holospy') || env.REPOSITORY_NAME == 'holospy' }}
working-directory: ${{ runner.temp }}
id: holospy_tests
run: |
pytest --pyargs holospy ${{ env.PYTEST_LOG_ARGS }}
- name: Report holospy test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.holospy_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ holospy test suite failed ⚠️
assignees: "ericpre,jlaehne,CSSFrancis"
- name: Run exSpy Test Suite
if: ${{ always() && contains(inputs.EXTENSIONS, 'exspy') || env.REPOSITORY_NAME == 'exspy' }}
working-directory: ${{ runner.temp }}
id: exspy_tests
run: |
pytest --pyargs exspy ${{ env.PYTEST_LOG_ARGS }}
- name: Report exSpy test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.exspy_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ exSpy test suite failed ⚠️
assignees: "ericpre,jlaehne,CSSFrancis"
- name: Run kikuchipy Test Suite
# skip dev version until https://github.com/pyxem/kikuchipy/pull/768 is sorted
if: ${{ always() && contains(inputs.EXTENSIONS, 'kikuchipy') && inputs.EXTENSION_VERSION != 'dev' || env.REPOSITORY_NAME == 'kikuchipy' }}
working-directory: ${{ runner.temp }}
id: kikuchipy_tests
run: |
# test_not_allow_download_raises: https://github.com/pyxem/kikuchipy/issues/707
# spherical: https://github.com/pyxem/kikuchipy/pull/749
# test_dataset_availability: don't test dataset availability to avoid hitting rate limits from zenodo
# test_load_with_padding: https://github.com/pyxem/orix/issues/643
pytest --pyargs kikuchipy ${{ env.PYTEST_LOG_ARGS }} -k "not test_not_allow_download_raises and not spherical and not test_dataset_availability and not test_load_with_padding"
- name: Report kikuchipy test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.kikuchipy_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ kikuchipy test suite failed ⚠️
assignees: "hakonanes"
- name: Run etspy Test Suite
if: ${{ always() && contains(inputs.EXTENSIONS, 'etspy') || env.REPOSITORY_NAME == 'etspy' }}
working-directory: ${{ runner.temp }}
id: etspy_tests
run: |
pytest --pyargs etspy ${{ env.PYTEST_LOG_ARGS }}
- name: Report etspy test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.etspy_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ etspy test suite failed ⚠️
assignees: "AndrewHerzing"
- name: Run atomap Test Suite
if: ${{ always() && contains(inputs.EXTENSIONS, 'atomap') || env.REPOSITORY_NAME == 'atomap' }}
working-directory: ${{ runner.temp }}
id: atomap_tests
run: |
# don't run tests that require a gui
# https://github.com/atomap-dev/atomap/pull/2
pytest --pyargs atomap ${{ env.PYTEST_LOG_ARGS }} -k "not test_gui_function_qt"
- name: Report atomap test failures as GitHub Issue
if: |
failure()
&& inputs.REPORT_FAILURE_AS_ISSUE
&& github.repository == 'hyperspy/hyperspy-extensions-list'
&& steps.atomap_tests.outcome == 'failure'
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd
with:
log-path: ${{ runner.temp }}/pytest-log.jsonl
issue-title: ⚠️ atomap test suite failed ⚠️
assignees: "magnunor"