@@ -11,61 +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.7
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.8
38+ os : ubuntu-22.04
39+ - python : ' 3.8'
4340 modules_tool : ${{needs.setup.outputs.lmod8}}
44- - python : 3.9
45- modules_tool : ${{needs.setup.outputs.lmod8}}
46- - python : ' 3.10'
41+ - python : ' 3.9'
4742 modules_tool : ${{needs.setup.outputs.lmod8}}
4843 - python : ' 3.11'
4944 modules_tool : ${{needs.setup.outputs.lmod8}}
50- # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set
51- # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7)
52- - python : 3.6
45+ - python : ' 3.12 '
46+ modules_tool : ${{needs.setup.outputs.lmod8}}
47+ - python : ' 3.13 '
5348 modules_tool : ${{needs.setup.outputs.lmod8}}
54- lc_all : C
5549 fail-fast : false
5650 steps :
57- - uses : actions/checkout@v3
51+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
5852
5953 - name : set up Python
60- uses : actions/setup-python@v4
54+ uses : actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
6155 with :
6256 python-version : ${{matrix.python}}
6357 architecture : x64
6458
6559 - name : install OS & Python packages
6660 run : |
6761 # for modules tool
68- 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"
6963 # for GitPython, python-hglib
7064 APT_PKGS+=" git mercurial"
7165 # dep for GC3Pie
@@ -79,19 +73,18 @@ jobs:
7973 sudo apt-get install $APT_PKGS
8074 fi
8175
82- # fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
83- # needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
84- if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then
85- 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
86- fi
8776 # Python packages
8877 pip --version
8978 pip install --upgrade pip
9079 pip --version
9180 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
9285 # git config is required to make actual git commits (cfr. tests for GitRepository)
93- git config --global user.name "Travis CI "
94- git config --global user.email "[email protected] " 86+ git config --global user.name "Github Actions "
87+ git config --global user.email "[email protected] " 9588 git config --get-regexp 'user.*'
9689
9790 - name : install GitHub token (if available)
@@ -101,12 +94,12 @@ jobs:
10194 # and are only run after the PR gets merged
10295 GITHUB_TOKEN : ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}}
10396 run : |
104- # 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
10598 # tests that require a GitHub token are skipped automatically when no GitHub token is available
106- if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.[69] ]]; then
99+ if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.9 ]]; then
107100 if [ ! -z $GITHUB_TOKEN ]; then
108- SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
109- 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')"
110103 fi
111104 echo "GitHub token installed!"
112105 else
@@ -129,7 +122,7 @@ jobs:
129122 run : |
130123 # make sure there are no (top-level) "import setuptools" or "import pkg_resources" statements,
131124 # since EasyBuild should not have a runtime requirement on setuptools
132- 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)
133126 test "x$SETUPTOOLS_IMPORTS" = "x" || (echo "Found setuptools and/or pkg_resources imports in easybuild/:\n${SETUPTOOLS_IMPORTS}" && exit 1)
134127
135128 - name : install sources
@@ -143,26 +136,24 @@ jobs:
143136 - name : run test suite
144137 env :
145138 EB_VERBOSE : 1
146- LC_ALL : ${{matrix.lc_all}}
139+ LC_ALL : " "
147140 run : |
148141 # run tests *outside* of checked out easybuild-framework directory,
149142 # to ensure we're testing installed version (see previous step)
150143 cd $HOME
151144 # initialize environment for modules tool
152145 if [ -f $HOME/moduleshome ]; then export MODULESHOME=$(cat $HOME/moduleshome); fi
153- source $(cat $HOME/mod_init); type module
146+ source $(cat $HOME/mod_init)
147+ type module
148+ module --version
154149 # make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that);
155150 # also pick up changes to $PATH set by sourcing $MOD_INIT
156151 export PREFIX=/tmp/$USER/$GITHUB_SHA
157152 export PATH=$PREFIX/bin:$(cat $HOME/path)
158153 export PYTHONPATH=$PREFIX/lib/python${{matrix.python}}/site-packages:$PYTHONPATH
159154 eb --version
160155 # tell EasyBuild which modules tool is available
161- if [[ ${{matrix.modules_tool}} =~ ^modules-tcl- ]]; then
162- export EASYBUILD_MODULES_TOOL=EnvironmentModulesTcl
163- elif [[ ${{matrix.modules_tool}} =~ ^modules-3 ]]; then
164- export EASYBUILD_MODULES_TOOL=EnvironmentModulesC
165- elif [[ ${{matrix.modules_tool}} =~ ^modules-4 ]]; then
156+ if [[ ${{matrix.modules_tool}} =~ ^modules- ]]; then
166157 export EASYBUILD_MODULES_TOOL=EnvironmentModules
167158 else
168159 export EASYBUILD_MODULES_TOOL=Lmod
@@ -191,7 +182,16 @@ jobs:
191182 # run test suite
192183 python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log
193184 # 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"
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"
195195 # '|| true' is needed to avoid that GitHub Actions stops the job on non-zero exit of grep (i.e. when there are no matches)
196196 PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
197197 test "x$PRINTED_MSG" = "x" || (echo "ERROR: Found printed messages in output of test suite" && echo "${PRINTED_MSG}" && exit 1)
0 commit comments