99 python : [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
1010 modules_tool : [Lmod-7.8.22, Lmod-8.2.9, modules-tcl-1.147, modules-3.2.10, modules-4.1.4]
1111 module_syntax : [Lua, Tcl]
12+ lc_all : [""]
1213 # exclude some configuration for non-Lmod modules tool:
1314 # - don't test with Lua module syntax (only supported in Lmod)
1415 # - exclude Python 3.x versions other than 3.6, to limit test configurations
5152 python : 3.8
5253 - modules_tool : Lmod-7.8.22
5354 python : 3.9
55+ # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set
56+ # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7)
57+ include :
58+ - python : 3.6
59+ modules_tool : Lmod-8.2.9
60+ module_syntax : Lua
61+ lc_all : C
5462 fail-fast : false
5563 steps :
5664 - uses : actions/checkout@v2
6977 # for modules tool
7078 sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev
7179 # fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
72- sudo ln -s /usr/lib/x86_64-linux-gnu/lua/5.2/posix_c.so /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so
80+ # needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
81+ if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then
82+ sudo ln -s /usr/lib/x86_64-linux-gnu/lua/5.2/posix_c.so /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so
83+ fi
7384 # for GitPython, python-hglib
7485 sudo apt-get install git mercurial
7586 # dep for GC3Pie
@@ -89,12 +100,20 @@ jobs:
89100 # see https://github.com/<username>/easybuild-framework/settings/secrets
90101 GITHUB_TOKEN : ${{secrets.TEST_GITHUB_TOKEN}}
91102 run : |
92- if [ ! -z $GITHUB_TOKEN ]; then
93- if [ "x${{matrix.python}}" == 'x2.6' ];
103+ # don't install GitHub token when testing with Lmod 7.x or non-Lmod module tools,
104+ # to avoid hitting GitHub rate limit;
105+ # tests that require a GitHub token are skipped automatically when no GitHub token is available
106+ if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]]; then
107+ if [ ! -z $GITHUB_TOKEN ]; then
108+ if [ "x${{matrix.python}}" == 'x2.6' ];
94109 then SET_KEYRING="keyring.set_keyring(keyring.backends.file.PlaintextKeyring())";
95110 else SET_KEYRING="import keyrings; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
96- fi;
97- python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";
111+ fi;
112+ python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";
113+ fi
114+ echo "GitHub token installed!"
115+ else
116+ echo "Installation of GitHub token skipped!"
98117 fi
99118
100119 - name : install modules tool
@@ -129,6 +148,7 @@ jobs:
129148 EB_VERBOSE : 1
130149 EASYBUILD_MODULE_SYNTAX : ${{matrix.module_syntax}}
131150 TEST_EASYBUILD_MODULE_SYNTAX : ${{matrix.module_syntax}}
151+ LC_ALL : ${{matrix.lc_all}}
132152 run : |
133153 # run tests *outside* of checked out easybuild-framework directory,
134154 # to ensure we're testing installed version (see previous step)
@@ -189,7 +209,7 @@ jobs:
189209 EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g')
190210 EB_BOOTSTRAP_SHA256SUM=$(sha256sum easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ')
191211 EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM"
192- EB_BOOTSTRAP_EXPECTED="20200820 .01 d490d229a18bd5eaa717bb8d5684d754729143d5e995e35a40c84d03ffb1de50 "
212+ EB_BOOTSTRAP_EXPECTED="20210106 .01 c2d93de0dd91123eb4f51cfc16d1f5efb80f1d238b3d6cd100994086887a1ae0 "
193213 test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1)
194214
195215 # test bootstrap script
0 commit comments