Skip to content

Commit cad27c2

Browse files
committed
Simplify setting shell using defaults
1 parent bddb037 commit cad27c2

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ env:
2626
TEST_DEPS: '"pytest<9" pytest-qt pytest-xdist pytest-rerunfailures pytest-mpl filelock'
2727
CONSTRUCTOR_VERSION: '3.14.0'
2828

29+
defaults:
30+
run:
31+
shell: bash -el {0}
32+
2933
jobs:
3034
create_release_job:
3135
name: Create Release (on tag only)
@@ -160,10 +164,6 @@ jobs:
160164
env:
161165
DISPLAY: ':0'
162166

163-
defaults:
164-
run:
165-
shell: bash -el {0}
166-
167167
steps:
168168
- uses: actions/checkout@v6
169169
- uses: conda-incubator/setup-miniconda@v3
@@ -377,9 +377,14 @@ jobs:
377377
WP_EXE: winpython.exe
378378
WP_DIR_NAME: WPy64-31280
379379

380+
defaults:
381+
run:
382+
shell: cmd
383+
380384
steps:
381385
- uses: actions/checkout@v6
382386
- name: Download Winpython
387+
shell: powershell
383388
run: |
384389
Invoke-WebRequest -OutFile ${{ env.WP_EXE }} ${{ env.WP_URL }}
385390
ls
@@ -388,21 +393,20 @@ jobs:
388393
if ($file_hash -ne "${{ env.WP_SHA256 }}") { exit(1) }
389394
390395
- name: Install Winpython
396+
shell: powershell
391397
run: |
392398
.\${{ env.WP_EXE }} -y | Out-Null
393399
ls
394400
ls ${{ env.WP_DIR_NAME }}
395401
396402
- name: Install libraries
397-
shell: cmd
398403
run: |
399404
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
400405
where python
401406
where pip
402407
pip install -r requirement_portable_distribution.txt
403408
404409
- name: Pip list
405-
shell: cmd
406410
run: |
407411
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
408412
pip list
@@ -417,7 +421,6 @@ jobs:
417421
echo $installer_name
418422
419423
- name: Run pyclean in distribution folder
420-
shell: cmd
421424
run: |
422425
where pip
423426
pip install pyclean
@@ -437,6 +440,7 @@ jobs:
437440
name: ${{ env.asset_name }}
438441

439442
- name: Install new distribution
443+
shell: powershell
440444
run: |
441445
Remove-Item -recurse ${{ env.WP_DIR_NAME }}
442446
ls
@@ -446,94 +450,81 @@ jobs:
446450
echo ${{ env.asset_name }}
447451
448452
- name: Check latest available hyperspy version
449-
shell: cmd
450453
run: |
451454
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
452455
python check_hyperspy_latest.py
453456
454457
- name: Install testing libraries
455458
if: always()
456-
shell: cmd
457459
run: |
458460
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
459461
pip install ${{ env.TEST_DEPS }}
460462
461463
- name: Run test suite (HyperSpyUI)
462464
if: always()
463-
shell: cmd
464465
run: |
465466
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
466467
# Error on closing figure, not critical
467468
pytest --pyargs hyperspyui -k "not plotting"
468469
469470
- name: Run test hyperspy
470471
if: always()
471-
shell: cmd
472472
run: |
473473
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
474474
pytest --pyargs hyperspy --reruns 3 -n 2
475475
476476
- name: Run test RosettaSciIO
477477
if: always()
478-
shell: cmd
479478
run: |
480479
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
481480
pytest --pyargs rsciio --reruns 3 -n 2 -k "not test_mrcz.py and not test_usid.py"
482481
483482
- name: Run test hyperspy_gui_ipywidgets
484483
if: always()
485-
shell: cmd
486484
run: |
487485
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
488486
pytest --pyargs hyperspy_gui_ipywidgets
489487
490488
- name: Run test hyperspy_gui_traitsui
491489
if: always()
492-
shell: cmd
493490
run: |
494491
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
495492
pytest --pyargs hyperspy_gui_traitsui
496493
497494
- name: Run test exspy
498495
if: always()
499-
shell: cmd
500496
run: |
501497
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
502498
pytest --pyargs exspy
503499
504500
- name: Run test holospy
505501
if: always()
506-
shell: cmd
507502
run: |
508503
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
509504
pytest --pyargs holospy
510505
511506
- name: Run test lumispy
512507
if: always()
513-
shell: cmd
514508
run: |
515509
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
516510
pytest --pyargs lumispy
517511
518512
- name: Run test pyxem
519513
if: always()
520-
shell: cmd
521514
run: |
522515
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
523516
# cause of the TestAddEllipseArrayAsMarkers failure is unknown (seems to be on blas mkl only)
524517
pytest --pyargs pyxem -k "not TestAddEllipseArrayAsMarkers"
525518
526519
- name: Run test atomap
527520
if: always()
528-
shell: cmd
529521
run: |
530522
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
531523
# Skip interactive test
532524
pytest --pyargs atomap -k "not TestSelectAtomsWithGui"
533525
534526
- name: Run test kikuchipy
535527
if: always()
536-
shell: cmd
537528
run: |
538529
call "${{ env.WP_DIR_NAME }}\scripts\env.bat"
539530
# https://github.com/pyxem/kikuchipy/issues/707

0 commit comments

Comments
 (0)