@@ -11,63 +11,55 @@ concurrency:
1111
1212jobs :
1313 setup :
14- runs-on : ubuntu-20.04
14+ runs-on : ubuntu-latest
1515 outputs :
16- lmod7 : Lmod-7.8.22
17- lmod8 : Lmod-8.7.6
18- modulesTcl : modules-tcl-1.147
19- modules3 : modules-3.2.10
20- modules4 : modules-4.1.4
16+ lmod8 : Lmod-8.7.58
17+ modules4 : modules-4.5.3
18+ modules5 : modules-5.3.1
2119 steps :
2220 - run : " true"
2321 build :
2422 needs : setup
25- runs-on : ubuntu-20 .04
23+ runs-on : ${{matrix.os || ' ubuntu-24 .04'}}
2624 strategy :
2725 matrix :
28- python : [3.6]
26+ # Python 3.10 is default in Ubuntu 22.04
27+ python : ['3.10']
2928 modules_tool :
3029 # use variables defined by 'setup' job above, see also
3130 # https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context
32- - ${{needs.setup.outputs.lmod7}}
3331 - ${{needs.setup.outputs.lmod8}}
34- - ${{needs.setup.outputs.modulesTcl}}
35- - ${{needs.setup.outputs.modules3}}
3632 - ${{needs.setup.outputs.modules4}}
37- lc_all : [""]
33+ - ${{needs.setup.outputs.modules5}}
3834 include :
39- # Test different Python 3 versions with Lmod 8.x
40- - python : 3.5
35+ # Test different Python 3 versions with Lmod 8.x (with both Lua and Tcl module syntax)
36+ - python : ' 3.7 '
4137 modules_tool : ${{needs.setup.outputs.lmod8}}
42- - python : 3.7
38+ os : ubuntu-22.04
39+ - python : ' 3.8'
4340 modules_tool : ${{needs.setup.outputs.lmod8}}
44- - python : 3.8
45- modules_tool : ${{needs.setup.outputs.lmod8}}
46- - python : 3.9
47- modules_tool : ${{needs.setup.outputs.lmod8}}
48- - python : ' 3.10'
41+ - python : ' 3.9'
4942 modules_tool : ${{needs.setup.outputs.lmod8}}
5043 - python : ' 3.11'
5144 modules_tool : ${{needs.setup.outputs.lmod8}}
52- # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set
53- # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7)
54- - python : 3.6
45+ - python : ' 3.12 '
46+ modules_tool : ${{needs.setup.outputs.lmod8}}
47+ - python : ' 3.13 '
5548 modules_tool : ${{needs.setup.outputs.lmod8}}
56- lc_all : C
5749 fail-fast : false
5850 steps :
59- - uses : actions/checkout@v3
51+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
6052
6153 - name : set up Python
62- uses : actions/setup-python@v4
54+ uses : actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
6355 with :
6456 python-version : ${{matrix.python}}
6557 architecture : x64
6658
6759 - name : install OS & Python packages
6860 run : |
6961 # for modules tool
70- APT_PKGS="lua5.2 liblua5.2 -dev lua-filesystem lua-posix tcl tcl-dev"
62+ APT_PKGS="lua5.3 liblua5.3 -dev lua-filesystem lua-posix tcl tcl-dev"
7163 # for GitPython, python-hglib
7264 APT_PKGS+=" git mercurial"
7365 # dep for GC3Pie
@@ -81,19 +73,18 @@ jobs:
8173 sudo apt-get install $APT_PKGS
8274 fi
8375
84- # fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
85- # needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
86- if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then
87- 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
88- fi
8976 # Python packages
9077 pip --version
9178 pip install --upgrade pip
9279 pip --version
9380 pip install -r requirements.txt
81+ if ! python -c "import distutils" 2> /dev/null; then
82+ # we need setuptools for distutils in Python 3.12+, needed for python setup.py sdist
83+ pip install --upgrade setuptools
84+ fi
9485 # git config is required to make actual git commits (cfr. tests for GitRepository)
95- git config --global user.name "Travis CI "
96- git config --global user.email "[email protected] " 86+ git config --global user.name "Github Actions "
87+ git config --global user.email "[email protected] " 9788 git config --get-regexp 'user.*'
9889
9990 - name : install GitHub token (if available)
@@ -103,12 +94,12 @@ jobs:
10394 # and are only run after the PR gets merged
10495 GITHUB_TOKEN : ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}}
10596 run : |
106- # only install GitHub token when testing with Lmod 8.x + Python 3.6 or 3. 9, to avoid hitting GitHub rate limit;
97+ # only install GitHub token when testing with Lmod 8.x + Python 3.9, to avoid hitting GitHub rate limit
10798 # tests that require a GitHub token are skipped automatically when no GitHub token is available
108- if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.[69] ]]; then
99+ if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.9 ]]; then
109100 if [ ! -z $GITHUB_TOKEN ]; then
110- SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
111- python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";
101+ SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())"
102+ python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')"
112103 fi
113104 echo "GitHub token installed!"
114105 else
@@ -131,7 +122,7 @@ jobs:
131122 run : |
132123 # make sure there are no (top-level) "import setuptools" or "import pkg_resources" statements,
133124 # since EasyBuild should not have a runtime requirement on setuptools
134- SETUPTOOLS_IMPORTS=$(egrep -RI '^(from|import)[ ]*pkg_resources|^(from|import)[ ]*setuptools' * || true)
125+ SETUPTOOLS_IMPORTS=$(egrep --exclude setup.py - RI '^(from|import)[ ]*pkg_resources|^(from|import)[ ]*setuptools' * || true)
135126 test "x$SETUPTOOLS_IMPORTS" = "x" || (echo "Found setuptools and/or pkg_resources imports in easybuild/:\n${SETUPTOOLS_IMPORTS}" && exit 1)
136127
137128 - name : install sources
@@ -145,26 +136,24 @@ jobs:
145136 - name : run test suite
146137 env :
147138 EB_VERBOSE : 1
148- LC_ALL : ${{matrix.lc_all}}
139+ LC_ALL : " "
149140 run : |
150141 # run tests *outside* of checked out easybuild-framework directory,
151142 # to ensure we're testing installed version (see previous step)
152143 cd $HOME
153144 # initialize environment for modules tool
154145 if [ -f $HOME/moduleshome ]; then export MODULESHOME=$(cat $HOME/moduleshome); fi
155- source $(cat $HOME/mod_init); type module
146+ source $(cat $HOME/mod_init)
147+ type module
148+ module --version
156149 # make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that);
157150 # also pick up changes to $PATH set by sourcing $MOD_INIT
158151 export PREFIX=/tmp/$USER/$GITHUB_SHA
159152 export PATH=$PREFIX/bin:$(cat $HOME/path)
160153 export PYTHONPATH=$PREFIX/lib/python${{matrix.python}}/site-packages:$PYTHONPATH
161154 eb --version
162155 # tell EasyBuild which modules tool is available
163- if [[ ${{matrix.modules_tool}} =~ ^modules-tcl- ]]; then
164- export EASYBUILD_MODULES_TOOL=EnvironmentModulesTcl
165- elif [[ ${{matrix.modules_tool}} =~ ^modules-3 ]]; then
166- export EASYBUILD_MODULES_TOOL=EnvironmentModulesC
167- elif [[ ${{matrix.modules_tool}} =~ ^modules-4 ]]; then
156+ if [[ ${{matrix.modules_tool}} =~ ^modules- ]]; then
168157 export EASYBUILD_MODULES_TOOL=EnvironmentModules
169158 else
170159 export EASYBUILD_MODULES_TOOL=Lmod
@@ -193,7 +182,16 @@ jobs:
193182 # run test suite
194183 python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log
195184 # try and make sure output of running tests is clean (no printed messages/warnings)
196- 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"
185+ IGNORE_PATTERNS="no GitHub token available"
186+ IGNORE_PATTERNS+="|skipping SvnRepository test"
187+ IGNORE_PATTERNS+="|requires Lmod as modules tool"
188+ IGNORE_PATTERNS+="|stty: 'standard input': Inappropriate ioctl for device"
189+ IGNORE_PATTERNS+="|CryptographyDeprecationWarning: Python 3.7"
190+ IGNORE_PATTERNS+="|from cryptography.* import "
191+ IGNORE_PATTERNS+="|Blowfish"
192+ IGNORE_PATTERNS+="|GC3Pie not available, skipping test"
193+ IGNORE_PATTERNS+="|CryptographyDeprecationWarning: TripleDES has been moved"
194+ IGNORE_PATTERNS+="|algorithms.TripleDES"
197195 # '|| true' is needed to avoid that GitHub Actions stops the job on non-zero exit of grep (i.e. when there are no matches)
198196 PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
199197 test "x$PRINTED_MSG" = "x" || (echo "ERROR: Found printed messages in output of test suite" && echo "${PRINTED_MSG}" && exit 1)
0 commit comments