@@ -258,7 +258,7 @@ jobs:
258258 # Initialise Lmod
259259 . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash
260260
261- # Make sure we using the module file from the repository
261+ # Make sure we are using the module file from the repository
262262 export MODULEPATH=init/modules
263263
264264 # Set the relevant environment variable and load the EESSI module
@@ -269,3 +269,46 @@ jobs:
269269 # Purge and check the module is still loaded
270270 module purge
271271 module list |& grep "EESSI/${{matrix.EESSI_VERSION}}"
272+
273+ check_family_eessi_module :
274+ runs-on : ubuntu-24.04
275+ strategy :
276+ fail-fast : false
277+ matrix :
278+ EESSI_VERSION :
279+ - ' 2023.06'
280+ - ' 2025.06'
281+
282+ steps :
283+ - name : Check out software-layer repository
284+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
285+
286+ - name : Mount EESSI CernVM-FS repository
287+ uses : cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
288+ with :
289+ cvmfs_config_package : https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
290+ cvmfs_http_proxy : DIRECT
291+ cvmfs_repositories : software.eessi.io
292+
293+ - name : Make sure we can use the family directive in the EESSI module
294+ run : |
295+ # Initialise Lmod
296+ . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash
297+
298+ # Add a test modulefile for a dummy stack with a "software_stack" family directive
299+ FAMILY=software_stack
300+ TMP_MODULEFILES=$(mktemp -d)
301+ LOCAL_STACK_NAME="local_stack"
302+ LOCAL_STACK_VERSION="${{matrix.EESSI_VERSION}}"
303+ mkdir -p "${TMP_MODULEFILES}/${LOCAL_STACK_NAME}"
304+ echo "family(\"${FAMILY}\")" > "${TMP_MODULEFILES}/${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}.lua"
305+
306+ # Make sure we are using the EESSI module file from the repository and the temporary one for the dummy local stack
307+ export MODULEPATH=init/modules:${TMP_MODULEFILES}
308+
309+ # Set the relevant environment variable, load the EESSI module and the local stack module, and grep for
310+ # Lmod is automatically replacing "..." with "...".
311+ export EESSI_MODULE_FAMILY_NAME=${FAMILY}
312+ module load "EESSI/${{matrix.EESSI_VERSION}}"
313+ GREP_PATTERN="Lmod is automatically replacing \"EESSI/${{matrix.EESSI_VERSION}}\" with \"${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}\"."
314+ module load "${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}" |& grep "${GREP_PATTERN}"
0 commit comments