@@ -11,61 +11,55 @@ concurrency:
11
11
12
12
jobs :
13
13
setup :
14
- runs-on : ubuntu-20.04
14
+ runs-on : ubuntu-latest
15
15
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
21
19
steps :
22
20
- run : " true"
23
21
build :
24
22
needs : setup
25
- runs-on : ubuntu-20 .04
23
+ runs-on : ${{matrix.os || ' ubuntu-24 .04'}}
26
24
strategy :
27
25
matrix :
28
- python : [3.6]
26
+ # Python 3.10 is default in Ubuntu 22.04
27
+ python : ['3.10']
29
28
modules_tool :
30
29
# use variables defined by 'setup' job above, see also
31
30
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context
32
- - ${{needs.setup.outputs.lmod7}}
33
31
- ${{needs.setup.outputs.lmod8}}
34
- - ${{needs.setup.outputs.modulesTcl}}
35
- - ${{needs.setup.outputs.modules3}}
36
32
- ${{needs.setup.outputs.modules4}}
37
- lc_all : [""]
33
+ - ${{needs.setup.outputs.modules5}}
38
34
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'
41
37
modules_tool : ${{needs.setup.outputs.lmod8}}
42
- - python : 3.8
38
+ os : ubuntu-22.04
39
+ - python : ' 3.8'
43
40
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'
47
42
modules_tool : ${{needs.setup.outputs.lmod8}}
48
43
- python : ' 3.11'
49
44
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 '
53
48
modules_tool : ${{needs.setup.outputs.lmod8}}
54
- lc_all : C
55
49
fail-fast : false
56
50
steps :
57
- - uses : actions/checkout@v3
51
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
58
52
59
53
- name : set up Python
60
- uses : actions/setup-python@v4
54
+ uses : actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
61
55
with :
62
56
python-version : ${{matrix.python}}
63
57
architecture : x64
64
58
65
59
- name : install OS & Python packages
66
60
run : |
67
61
# 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"
69
63
# for GitPython, python-hglib
70
64
APT_PKGS+=" git mercurial"
71
65
# dep for GC3Pie
@@ -79,19 +73,18 @@ jobs:
79
73
sudo apt-get install $APT_PKGS
80
74
fi
81
75
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
87
76
# Python packages
88
77
pip --version
89
78
pip install --upgrade pip
90
79
pip --version
91
80
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
92
85
# 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 "travis@travis-ci.org "
86
+ git config --global user.name "Github Actions "
87
+ git config --global user.email "actions@github.com "
95
88
git config --get-regexp 'user.*'
96
89
97
90
- name : install GitHub token (if available)
@@ -101,12 +94,12 @@ jobs:
101
94
# and are only run after the PR gets merged
102
95
GITHUB_TOKEN : ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}}
103
96
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
105
98
# 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
107
100
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')"
110
103
fi
111
104
echo "GitHub token installed!"
112
105
else
@@ -129,7 +122,7 @@ jobs:
129
122
run : |
130
123
# make sure there are no (top-level) "import setuptools" or "import pkg_resources" statements,
131
124
# 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)
133
126
test "x$SETUPTOOLS_IMPORTS" = "x" || (echo "Found setuptools and/or pkg_resources imports in easybuild/:\n${SETUPTOOLS_IMPORTS}" && exit 1)
134
127
135
128
- name : install sources
@@ -143,26 +136,24 @@ jobs:
143
136
- name : run test suite
144
137
env :
145
138
EB_VERBOSE : 1
146
- LC_ALL : ${{matrix.lc_all}}
139
+ LC_ALL : " "
147
140
run : |
148
141
# run tests *outside* of checked out easybuild-framework directory,
149
142
# to ensure we're testing installed version (see previous step)
150
143
cd $HOME
151
144
# initialize environment for modules tool
152
145
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
154
149
# make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that);
155
150
# also pick up changes to $PATH set by sourcing $MOD_INIT
156
151
export PREFIX=/tmp/$USER/$GITHUB_SHA
157
152
export PATH=$PREFIX/bin:$(cat $HOME/path)
158
153
export PYTHONPATH=$PREFIX/lib/python${{matrix.python}}/site-packages:$PYTHONPATH
159
154
eb --version
160
155
# 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
166
157
export EASYBUILD_MODULES_TOOL=EnvironmentModules
167
158
else
168
159
export EASYBUILD_MODULES_TOOL=Lmod
@@ -191,7 +182,16 @@ jobs:
191
182
# run test suite
192
183
python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log
193
184
# 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"
195
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
196
PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
197
197
test "x$PRINTED_MSG" = "x" || (echo "ERROR: Found printed messages in output of test suite" && echo "${PRINTED_MSG}" && exit 1)
0 commit comments