Skip to content

Commit

Permalink
also test create_lmodsitepackage.py in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Apr 2, 2024
1 parent f25bfe0 commit fa888dd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/tests_scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
paths:
- build_container.sh
- create_directory_tarballs.sh
- create_lmodsitepackage.py
- EESSI-install-software.sh
- install_software_layer.sh
- load_easybuild_module.sh
Expand Down Expand Up @@ -94,3 +95,19 @@ jobs:
./eessi_container.sh --mode run --verbose /software-layer/create_directory_tarballs.sh 2023.06
# check if tarballs have been produced
ls -l *.tar.gz
- name: test create_lmodsitepackage.py script
run: |
python3 create_lmodsitepackage.py .
export LMOD_PACKAGE_PATH="$PWD/.lmod"
# run some commands to make sure that generated Lmod SitePackage file works
test_script="${PWD}/test_lmod_sitepackage.sh"
echo '#!/bin/bash' > ${test_script}
echo 'ml --config' >> ${test_script}
chmod u+x ${test_script}
./eessi_container.sh --access rw --mode run --verbose /software-layer/run_in_compat_layer_env.sh $PWD/${test_script} 2>&1 | tee ${out}
for pattern in "^Site Pkg location.*$PWD/.lmod/SitePackage.lua" "LMOD_SITEPACKAGE_LOCATION.*${PWD}/.lmod/SitePackage.lua"; do
grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1)
done

0 comments on commit fa888dd

Please sign in to comment.