@@ -34,44 +34,23 @@ jobs:
3434 - ${{needs.setup.outputs.modulesTcl}}
3535 - ${{needs.setup.outputs.modules3}}
3636 - ${{needs.setup.outputs.modules4}}
37- module_syntax : [Lua, Tcl]
3837 lc_all : [""]
39- # don't test with Lua module syntax (only supported in Lmod)
40- exclude :
41- - modules_tool : ${{needs.setup.outputs.modulesTcl}}
42- module_syntax : Lua
43- - modules_tool : ${{needs.setup.outputs.modules3}}
44- module_syntax : Lua
45- - modules_tool : ${{needs.setup.outputs.modules4}}
46- module_syntax : Lua
4738 include :
4839 # Test different Python 3 versions with Lmod 8.x (with both Lua and Tcl module syntax)
4940 - python : 3.7
5041 modules_tool : ${{needs.setup.outputs.lmod8}}
51- module_syntax : Lua
5242 - python : 3.8
5343 modules_tool : ${{needs.setup.outputs.lmod8}}
54- module_syntax : Lua
55- - python : 3.8
56- modules_tool : ${{needs.setup.outputs.lmod8}}
57- module_syntax : Tcl
5844 - python : 3.9
5945 modules_tool : ${{needs.setup.outputs.lmod8}}
60- module_syntax : Lua
6146 - python : ' 3.10'
6247 modules_tool : ${{needs.setup.outputs.lmod8}}
63- module_syntax : Lua
64- - python : ' 3.11'
65- modules_tool : ${{needs.setup.outputs.lmod8}}
66- module_syntax : Lua
6748 - python : ' 3.11'
6849 modules_tool : ${{needs.setup.outputs.lmod8}}
69- module_syntax : Tcl
7050 # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set
7151 # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7)
7252 - python : 3.6
7353 modules_tool : ${{needs.setup.outputs.lmod8}}
74- module_syntax : Lua
7554 lc_all : C
7655 fail-fast : false
7756 steps :
@@ -122,16 +101,11 @@ jobs:
122101 # and are only run after the PR gets merged
123102 GITHUB_TOKEN : ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}}
124103 run : |
125- # don't install GitHub token when testing with Lmod 7.x or non-Lmod module tools,
126- # and only when testing with Lua as module syntax,
127- # to avoid hitting GitHub rate limit;
104+ # don't install GitHub token when testing with Lmod 7.x or non-Lmod module tools, to avoid hitting GitHub rate limit;
128105 # tests that require a GitHub token are skipped automatically when no GitHub token is available
129- if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]] && [[ "${{matrix.module_syntax}}" == 'Lua' ]] ; then
106+ if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]]; then
130107 if [ ! -z $GITHUB_TOKEN ]; then
131- if [ "x${{matrix.python}}" == 'x2.6' ];
132- then SET_KEYRING="keyring.set_keyring(keyring.backends.file.PlaintextKeyring())";
133- else SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
134- fi;
108+ SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
135109 python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";
136110 fi
137111 echo "GitHub token installed!"
@@ -169,8 +143,6 @@ jobs:
169143 - name : run test suite
170144 env :
171145 EB_VERBOSE : 1
172- EASYBUILD_MODULE_SYNTAX : ${{matrix.module_syntax}}
173- TEST_EASYBUILD_MODULE_SYNTAX : ${{matrix.module_syntax}}
174146 LC_ALL : ${{matrix.lc_all}}
175147 run : |
176148 # run tests *outside* of checked out easybuild-framework directory,
@@ -195,19 +167,32 @@ jobs:
195167 else
196168 export EASYBUILD_MODULES_TOOL=Lmod
197169 fi
198- export TEST_EASYBUILD_MODULES_TOOL=$EASYBUILD_MODULES_TOOL
199- eb --show-config
200- # gather some useful info on test system
201- eb --show-system-info
202- # check GitHub configuration
203- eb --check-github --github-user=easybuild_test
204- # create file owned by root but writable by anyone (used by test_copy_file)
205- sudo touch /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt
206- sudo chmod o+w /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt
207- # run test suite
208- python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log
209- # try and make sure output of running tests is clean (no printed messages/warnings)
210- IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|requires Lmod as modules tool|stty: 'standard input': Inappropriate ioctl for device|CryptographyDeprecationWarning: Python 3.[56]|from cryptography.* import |CryptographyDeprecationWarning: Python 2|Blowfish|GC3Pie not available, skipping test"
211- # '|| true' is needed to avoid that Travis stops the job on non-zero exit of grep (i.e. when there are no matches)
212- PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
213- test "x$PRINTED_MSG" = "x" || (echo "ERROR: Found printed messages in output of test suite" && echo "${PRINTED_MSG}" && exit 1)
170+ export TEST_EASYBUILD_MODULES_TOOL=${EASYBUILD_MODULES_TOOL}
171+
172+ # Run tests with LUA and Tcl module syntax (where supported)
173+ for module_syntax in Lua Tcl; do
174+ # Only Lmod supports Lua
175+ if [[ "${module_syntax}" == "Lua" ]] && [[ "${EASYBUILD_MODULES_TOOL}" != "Lmod" ]]; then
176+ echo "Not testing with '${module_syntax}' as module syntax with '${EASYBUILD_MODULES_TOOL}' as modules tool"
177+ continue
178+ fi
179+ printf '\n\n=====================> Using $module_syntax module syntax <=====================\n\n'
180+ export EASYBUILD_MODULE_SYNTAX="${module_syntax}"
181+ export TEST_EASYBUILD_MODULE_SYNTAX="${EASYBUILD_MODULE_SYNTAX}"
182+
183+ eb --show-config
184+ # gather some useful info on test system
185+ eb --show-system-info
186+ # check GitHub configuration
187+ eb --check-github --github-user=easybuild_test
188+ # create file owned by root but writable by anyone (used by test_copy_file)
189+ sudo touch /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt
190+ sudo chmod o+w /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt
191+ # run test suite
192+ python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log
193+ # try and make sure output of running tests is clean (no printed messages/warnings)
194+ IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|requires Lmod as modules tool|stty: 'standard input': Inappropriate ioctl for device|CryptographyDeprecationWarning: Python 3.[56]|from cryptography.* import |CryptographyDeprecationWarning: Python 2|Blowfish|GC3Pie not available, skipping test"
195+ # '|| true' is needed to avoid that GitHub Actions stops the job on non-zero exit of grep (i.e. when there are no matches)
196+ PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
197+ test "x$PRINTED_MSG" = "x" || (echo "ERROR: Found printed messages in output of test suite" && echo "${PRINTED_MSG}" && exit 1)
198+ done
0 commit comments