diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 4bae0908c19..50fa7b74cc8 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -10,12 +10,12 @@ concurrency: jobs: python-linting: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 3cd95ff88de..eb5dc565fef 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -10,15 +10,15 @@ concurrency: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: - python: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] + python: [3.7, 3.8, 3.9, '3.10', '3.11'] modules_tool: [Lmod-6.6.3, Lmod-7.8.22, Lmod-8.1.14, modules-tcl-1.147, modules-3.2.10, modules-4.1.4] module_syntax: [Lua, Tcl] # exclude some configuration for non-Lmod modules tool: # - don't test with Lua module syntax (only supported in Lmod) - # - don't test with Python 3.7+ (only with 3.6), to limit test configurations + # - don't test with Python 3.8+ (only with 3.7), to limit test configurations exclude: - modules_tool: modules-tcl-1.147 module_syntax: Lua @@ -26,8 +26,6 @@ jobs: module_syntax: Lua - modules_tool: modules-4.1.4 module_syntax: Lua - - modules_tool: modules-tcl-1.147 - python: 3.7 - modules_tool: modules-tcl-1.147 python: 3.8 - modules_tool: modules-tcl-1.147 @@ -36,8 +34,6 @@ jobs: python: '3.10' - modules_tool: modules-tcl-1.147 python: '3.11' - - modules_tool: modules-3.2.10 - python: 3.7 - modules_tool: modules-3.2.10 python: 3.8 - modules_tool: modules-3.2.10 @@ -46,8 +42,6 @@ jobs: python: '3.10' - modules_tool: modules-3.2.10 python: '3.11' - - modules_tool: modules-4.1.4 - python: 3.7 - modules_tool: modules-4.1.4 python: 3.8 - modules_tool: modules-4.1.4 @@ -58,10 +52,10 @@ jobs: python: '3.11' fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python}} architecture: x64 @@ -73,11 +67,6 @@ jobs: # sudo apt-get update # for modules tool sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev - # fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082 - # needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists - if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then - 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 - fi # for testing OpenMPI-system*eb we need to have Open MPI installed sudo apt-get install libopenmpi-dev openmpi-bin diff --git a/test/easyblocks/module.py b/test/easyblocks/module.py index 026c3b35839..e7ea17844be 100644 --- a/test/easyblocks/module.py +++ b/test/easyblocks/module.py @@ -227,6 +227,10 @@ def test_pythonpackage_det_pylibdir(self): def test_pythonpackage_pick_python_cmd(self): """Test pick_python_cmd function from pythonpackage.py.""" from easybuild.easyblocks.generic.pythonpackage import pick_python_cmd + # Install a dummy Python to use. It only needs to echo the major, minor and patch version + tmpdir = tempfile.mkdtemp() + for cmd in ('python2', 'python2.6'): + install_fake_command(cmd, "#!/bin/bash\n echo 2.6.4", tmpdir) self.assertTrue(pick_python_cmd() is not None) self.assertTrue(pick_python_cmd(2) is not None) self.assertTrue(pick_python_cmd(2, 6) is not None)