Skip to content

Commit 5fea69d

Browse files
committed
ci: merge lmod/tcl module test script
Merge the *Run python module tests* script for Lmod and Environment Modules as a single script. It will help to see the initialization differences between the two module flavors. It will also be easier to apply changes to this test script or to add support for other module implementation. Explicit the use of the bash shell for this script, thus use the bash-specific initialisation script for module.
1 parent 44bdbad commit 5fea69d

File tree

1 file changed

+11
-30
lines changed

1 file changed

+11
-30
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,45 +55,26 @@ jobs:
5555
pip install -e .
5656
5757
- name: Run python module tests
58-
if: ${{ matrix.module == 'lmod' }}
59-
run: |
60-
export PATH="/usr/share/miniconda/bin:$PATH"
61-
. /usr/share/lmod/lmod/init/sh
62-
source activate shpc
63-
shpc config set container_tech:${{ matrix.container_tech }}
64-
shpc config set module_sys:${{ matrix.module }}
65-
shpc config set enable_tty:false
66-
shpc install python:3.9.5-alpine
67-
module use ./modules
68-
module load python/3.9.5-alpine
69-
alias
70-
71-
printf "\n\nmodule show ============================================\n"
72-
module show python/3.9.5-alpine
73-
74-
printf "\n\nmodule whatis ==========================================\n"
75-
module whatis python/3.9.5-alpine
76-
77-
printf "\n\nmodule help ============================================\n"
78-
module help python/3.9.5-alpine
79-
python-exec echo donuts
80-
python-run python --version
81-
82-
- name: Run python module tests
83-
if: ${{ matrix.module == 'tcl' }}
8458
shell: bash
8559
run: |
60+
case "${{ matrix.module }}" in
61+
lmod)
62+
. /usr/share/lmod/lmod/init/bash
63+
;;
64+
tcl)
65+
. /usr/local/Modules/init/bash
66+
shopt expand_aliases || true
67+
shopt -s expand_aliases
68+
;;
69+
esac
70+
8671
export PATH="/usr/share/miniconda/bin:$PATH"
87-
. /usr/local/Modules/init/sh
8872
source activate shpc
8973
shpc config set container_tech:${{ matrix.container_tech }}
9074
shpc config set module_sys:${{ matrix.module }}
9175
shpc config set enable_tty:false
9276
shpc install python:3.9.5-alpine
9377
94-
shopt expand_aliases || true
95-
shopt -s expand_aliases
96-
9778
module use ./modules
9879
module load python/3.9.5-alpine
9980
alias

0 commit comments

Comments
 (0)