From b3d5a7ddda47dae9f2252254e28e669aff5eb14d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 2 Mar 2025 16:03:28 +0100 Subject: [PATCH 1/4] stop using Ubuntu 20.4 in GitHub Actions workflows, use Ubuntu 22.04 instead --- .github/workflows/container_tests.yml | 6 +- .../workflows/container_tests_apptainer.yml | 14 +--- .github/workflows/eb_command.yml | 16 ++-- .github/workflows/end2end.yml | 9 +- .github/workflows/linting.yml | 8 +- .github/workflows/unit_tests.yml | 42 ++++------ .github/workflows/unit_tests_python36.yml | 82 +++++++++++++++++++ 7 files changed, 118 insertions(+), 59 deletions(-) create mode 100644 .github/workflows/unit_tests_python36.yml diff --git a/.github/workflows/container_tests.yml b/.github/workflows/container_tests.yml index 85e9198855..4521186580 100644 --- a/.github/workflows/container_tests.yml +++ b/.github/workflows/container_tests.yml @@ -17,10 +17,10 @@ jobs: python: [3.7] fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: python-version: ${{matrix.python}} architecture: x64 @@ -28,7 +28,7 @@ jobs: - name: install OS & Python packages run: | # for modules tool - APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + APT_PKGS="lua5.3 liblua5.3-dev lua-filesystem lua-posix tcl tcl-dev" # for building Singularity images APT_PKGS+=" rpm dnf" diff --git a/.github/workflows/container_tests_apptainer.yml b/.github/workflows/container_tests_apptainer.yml index 4f9df0df9a..1f8417ea7d 100644 --- a/.github/workflows/container_tests_apptainer.yml +++ b/.github/workflows/container_tests_apptainer.yml @@ -15,13 +15,13 @@ jobs: strategy: matrix: python: [3.7] - apptainer: [1.0.0, 1.1.7] + apptainer: [1.0.0, 1.1.7, 1.3.6] fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 - name: set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: python-version: ${{matrix.python}} architecture: x64 @@ -31,7 +31,7 @@ jobs: # for building CentOS 7 container images APT_PKGS="rpm dnf" # for modules tool - APT_PKGS+=" lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + APT_PKGS+=" lua5.3 liblua5.3-dev lua-filesystem lua-posix tcl tcl-dev" # Avoid apt-get update, as we don't really need it, # and it does more harm than good (it's fairly expensive, and it results in flaky test runs) @@ -41,12 +41,6 @@ jobs: sudo apt-get install $APT_PKGS fi - # 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 - - name: install Lmod run: | # avoid downloading modules tool sources into easybuild-framework dir diff --git a/.github/workflows/eb_command.yml b/.github/workflows/eb_command.yml index 625206b870..e1c3f87996 100644 --- a/.github/workflows/eb_command.yml +++ b/.github/workflows/eb_command.yml @@ -11,16 +11,16 @@ concurrency: jobs: test-eb: - 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', '3.12', '3.13'] + python: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', '3.13'] fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: python-version: ${{matrix.python}} architecture: x64 @@ -38,7 +38,7 @@ jobs: fi # for modules tool - APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + APT_PKGS="lua5.3 liblua5.3-dev lua-filesystem lua-posix tcl tcl-dev" # Avoid apt-get update, as we don't really need it, # and it does more harm than good (it's fairly expensive, and it results in flaky test runs) @@ -48,12 +48,6 @@ jobs: sudo apt-get install $APT_PKGS fi - # 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 - - name: install modules tool run: | # avoid downloading modules tool sources into easybuild-framework dir diff --git a/.github/workflows/end2end.yml b/.github/workflows/end2end.yml index dedbcaa8d9..3ebce2ccc6 100644 --- a/.github/workflows/end2end.yml +++ b/.github/workflows/end2end.yml @@ -8,12 +8,13 @@ jobs: matrix: container: - centos-8.5 - - fedora-36 + - fedora-41 - opensuse-15.4 - - rockylinux-8.8 - - rockylinux-9.2 + - rockylinux-8.10 + - rockylinux-9.5 - ubuntu-20.04 - ubuntu-22.04 + - ubuntu-24.04 fail-fast: false container: image: ghcr.io/easybuilders/${{ matrix.container }}-amd64 @@ -27,7 +28,7 @@ jobs: curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 - name: Check out the repo - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 - name: download and unpack easyblocks and easyconfigs repositories run: | diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9dba1ed474..faff6f75a9 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -10,15 +10,15 @@ concurrency: jobs: python-linting: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12', '3.13'] + python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index d39994361d..a2409daeae 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -11,9 +11,9 @@ concurrency: jobs: setup: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: - lmod8: Lmod-8.7.6 + lmod8: Lmod-8.7.58 modules4: modules-4.5.3 modules5: modules-5.3.1 steps: @@ -23,7 +23,8 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python: [3.6] + # Python 3.10 is default in Ubuntu 22.04 + python: ['3.10'] modules_tool: # use variables defined by 'setup' job above, see also # https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context @@ -33,13 +34,11 @@ jobs: lc_all: [""] include: # Test different Python 3 versions with Lmod 8.x (with both Lua and Tcl module syntax) - - python: 3.7 - modules_tool: ${{needs.setup.outputs.lmod8}} - - python: 3.8 + - python: '3.7' modules_tool: ${{needs.setup.outputs.lmod8}} - - python: 3.9 + - python: '3.8' modules_tool: ${{needs.setup.outputs.lmod8}} - - python: '3.10' + - python: '3.9' modules_tool: ${{needs.setup.outputs.lmod8}} - python: '3.11' modules_tool: ${{needs.setup.outputs.lmod8}} @@ -47,17 +46,12 @@ jobs: modules_tool: ${{needs.setup.outputs.lmod8}} - python: '3.13' modules_tool: ${{needs.setup.outputs.lmod8}} - # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set - # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7) - - python: 3.6 - modules_tool: ${{needs.setup.outputs.lmod8}} - lc_all: C fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 - name: set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: python-version: ${{matrix.python}} architecture: x64 @@ -65,7 +59,7 @@ jobs: - name: install OS & Python packages run: | # for modules tool - APT_PKGS="lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev" + APT_PKGS="lua5.3 liblua5.3-dev lua-filesystem lua-posix tcl tcl-dev" # for GitPython, python-hglib APT_PKGS+=" git mercurial" # dep for GC3Pie @@ -79,11 +73,6 @@ jobs: sudo apt-get install $APT_PKGS fi - # 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 # Python packages pip --version pip install --upgrade pip @@ -94,8 +83,8 @@ jobs: pip install --upgrade setuptools fi # git config is required to make actual git commits (cfr. tests for GitRepository) - git config --global user.name "Travis CI" - git config --global user.email "travis@travis-ci.org" + git config --global user.name "Github Actions" + git config --global user.email "actions@github.com" git config --get-regexp 'user.*' - name: install GitHub token (if available) @@ -105,9 +94,9 @@ jobs: # and are only run after the PR gets merged GITHUB_TOKEN: ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}} run: | - # only install GitHub token when testing with Lmod 8.x + Python 3.6 or 3.9, to avoid hitting GitHub rate limit + # only install GitHub token when testing with Lmod 8.x + Python 3.9, to avoid hitting GitHub rate limit # tests that require a GitHub token are skipped automatically when no GitHub token is available - if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.[69] ]]; then + if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.9 ]]; then if [ ! -z $GITHUB_TOKEN ]; then SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())" python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')" @@ -197,9 +186,8 @@ jobs: IGNORE_PATTERNS+="|skipping SvnRepository test" IGNORE_PATTERNS+="|requires Lmod as modules tool" IGNORE_PATTERNS+="|stty: 'standard input': Inappropriate ioctl for device" - IGNORE_PATTERNS+="|CryptographyDeprecationWarning: Python 3.[567]" + IGNORE_PATTERNS+="|CryptographyDeprecationWarning: Python 3.7" IGNORE_PATTERNS+="|from cryptography.* import " - IGNORE_PATTERNS+="|CryptographyDeprecationWarning: Python 2" IGNORE_PATTERNS+="|Blowfish" IGNORE_PATTERNS+="|GC3Pie not available, skipping test" IGNORE_PATTERNS+="|CryptographyDeprecationWarning: TripleDES has been moved" diff --git a/.github/workflows/unit_tests_python36.yml b/.github/workflows/unit_tests_python36.yml new file mode 100644 index 0000000000..061cc3c0c7 --- /dev/null +++ b/.github/workflows/unit_tests_python36.yml @@ -0,0 +1,82 @@ +# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions +name: EasyBuild framework unit tests (Python 3.6) +on: [push, pull_request] + +permissions: + contents: read # to fetch code (actions/checkout) + +concurrency: + group: ${{format('{0}:{1}:{2}', github.repository, github.ref, github.workflow)}} + cancel-in-progress: true + +jobs: + test_python36: + runs-on: ubuntu-22.04 + container: + # Ubuntu 20.04 container that already includes Lmod & co, + # see https://github.com/easybuilders/easybuild-containers + image: ghcr.io/easybuilders/ubuntu-20.04-amd64 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + + - name: install Python packages + run: | + # Python packages + python3 -V + python3 -m pip --version + python3 -m pip install --upgrade pip + python3 -m pip --version + python3 -m pip install -r requirements.txt + # git config is required to make actual git commits (cfr. tests for GitRepository) + sudo -u easybuild git config --global user.name "GitHub Actions" + sudo -u easybuild git config --global user.email "actions@github.com" + sudo -u easybuild git config --get-regexp 'user.*' + + - name: install GitHub token (if available) + env: + # token (owned by @boegelbot) with gist permissions (required for some of the tests for GitHub integration); + # this token is not available in pull requests, so tests that require it are skipped in PRs, + # and are only run after the PR gets merged + GITHUB_TOKEN: ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}} + run: | + # tests that require a GitHub token are skipped automatically when no GitHub token is available + if [ ! -z $GITHUB_TOKEN ]; then + sudo -u easybuild python3 -c "import keyring; import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring()); keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')"; + echo "GitHub token installed!" + else + echo "Installation of GitHub token skipped!" + fi + + - name: install sources + run: | + # install from source distribution tarball, to test release as published on PyPI + python3 setup.py sdist + ls dist + export PREFIX=/tmp/$USER/$GITHUB_SHA + python3 -m pip install --prefix $PREFIX dist/easybuild-framework*tar.gz + + - name: run test suite + run: | + # run tests *outside* of checked out easybuild-framework directory, + # to ensure we're testing installed version (see previous step) + cd $HOME + # make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that) + export PREFIX=/tmp/$USER/$GITHUB_SHA + ENV_CMDS="export PATH=$PREFIX/bin:$PATH; export PYTHONPATH=$PREFIX/lib/python3.6/site-packages:$PYTHONPATH" + ENV_CMDS="${ENV_CMDS}; export EB_VERBOSE=1; export EB_PYTHON=python3" + # run EasyBuild command via (non-root) easybuild user + login shell + sudo -u easybuild bash -l -c "${ENV_CMDS}; module --version; eb --version" + # show active EasyBuild configuration + sudo -u easybuild bash -l -c "${ENV_CMDS}; eb --show-config" + # gather some useful info on test system + sudo -u easybuild bash -l -c "${ENV_CMDS}; eb --show-system-info" + # check GitHub configuration + sudo -u easybuild bash -l -c "${ENV_CMDS}; eb --check-github --github-user=easybuild_test" + # create file owned by root but writable by anyone (used by test_copy_file) + sudo touch /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt + sudo chmod o+w /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt + # run test suite (via easybuild user + login shell) + sudo -u easybuild bash -l -c "${ENV_CMDS}; python3 -O -m test.framework.suite" + # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set + # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7) + sudo -u easybuild bash -l -c "${ENV_CMDS}; export LC_ALL=C; python3 -O -m test.framework.suite" From 8516e1cd3a185ce3ac9de14e11b58320b1f2a186 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 3 Mar 2025 18:41:54 +0100 Subject: [PATCH 2/4] use python3.6 command instead of python3 in workflow to run tests with Python 3.6 in Ubuntu 20.04 container --- .github/workflows/unit_tests_python36.yml | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unit_tests_python36.yml b/.github/workflows/unit_tests_python36.yml index 061cc3c0c7..0fc842c934 100644 --- a/.github/workflows/unit_tests_python36.yml +++ b/.github/workflows/unit_tests_python36.yml @@ -13,20 +13,20 @@ jobs: test_python36: runs-on: ubuntu-22.04 container: - # Ubuntu 20.04 container that already includes Lmod & co, + # Ubuntu 20.04 container that already includes Python 3.6 + Lmod & co, # see https://github.com/easybuilders/easybuild-containers - image: ghcr.io/easybuilders/ubuntu-20.04-amd64 + image: ghcr.io/easybuilders/ubuntu-20.04-python36-amd64 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 - name: install Python packages run: | # Python packages - python3 -V - python3 -m pip --version - python3 -m pip install --upgrade pip - python3 -m pip --version - python3 -m pip install -r requirements.txt + python3.6 -V + python3.6 -m pip --version + python3.6 -m pip install --upgrade pip + python3.6 -m pip --version + python3.6 -m pip install -r requirements.txt # git config is required to make actual git commits (cfr. tests for GitRepository) sudo -u easybuild git config --global user.name "GitHub Actions" sudo -u easybuild git config --global user.email "actions@github.com" @@ -41,7 +41,7 @@ jobs: run: | # tests that require a GitHub token are skipped automatically when no GitHub token is available if [ ! -z $GITHUB_TOKEN ]; then - sudo -u easybuild python3 -c "import keyring; import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring()); keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')"; + sudo -u easybuild python3.6 -c "import keyring; import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring()); keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')"; echo "GitHub token installed!" else echo "Installation of GitHub token skipped!" @@ -50,10 +50,10 @@ jobs: - name: install sources run: | # install from source distribution tarball, to test release as published on PyPI - python3 setup.py sdist + python3.6 setup.py sdist ls dist export PREFIX=/tmp/$USER/$GITHUB_SHA - python3 -m pip install --prefix $PREFIX dist/easybuild-framework*tar.gz + python3.6 -m pip install --prefix $PREFIX dist/easybuild-framework*tar.gz - name: run test suite run: | @@ -63,7 +63,7 @@ jobs: # make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that) export PREFIX=/tmp/$USER/$GITHUB_SHA ENV_CMDS="export PATH=$PREFIX/bin:$PATH; export PYTHONPATH=$PREFIX/lib/python3.6/site-packages:$PYTHONPATH" - ENV_CMDS="${ENV_CMDS}; export EB_VERBOSE=1; export EB_PYTHON=python3" + ENV_CMDS="${ENV_CMDS}; export EB_VERBOSE=1; export EB_PYTHON=python3.6" # run EasyBuild command via (non-root) easybuild user + login shell sudo -u easybuild bash -l -c "${ENV_CMDS}; module --version; eb --version" # show active EasyBuild configuration @@ -76,7 +76,7 @@ jobs: sudo touch /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt sudo chmod o+w /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt # run test suite (via easybuild user + login shell) - sudo -u easybuild bash -l -c "${ENV_CMDS}; python3 -O -m test.framework.suite" + sudo -u easybuild bash -l -c "${ENV_CMDS}; python3.6 -O -m test.framework.suite" # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7) - sudo -u easybuild bash -l -c "${ENV_CMDS}; export LC_ALL=C; python3 -O -m test.framework.suite" + sudo -u easybuild bash -l -c "${ENV_CMDS}; export LC_ALL=C; python3.6 -O -m test.framework.suite" From 796df9a9225c4f13abfea4017b72a27b6a810092 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 3 Mar 2025 20:30:48 +0100 Subject: [PATCH 3/4] use --filter-deps in end2end test in fedora-41 or ubuntu-24.04 container + remove workarounds that were only needed in centos-7.9 container --- .github/workflows/end2end.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/end2end.yml b/.github/workflows/end2end.yml index 3ebce2ccc6..b2bf320d94 100644 --- a/.github/workflows/end2end.yml +++ b/.github/workflows/end2end.yml @@ -18,15 +18,7 @@ jobs: fail-fast: false container: image: ghcr.io/easybuilders/${{ matrix.container }}-amd64 - volumes: - - /node20217:/node20217:rw,rshared - - ${{ matrix.container == 'centos-7.9' && '/node20217:/__e/node20:ro,rshared' || ' ' }} steps: - - name: install nodejs20glibc2.17 - if: ${{ matrix.container == 'centos-7.9' }} - run: | - curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz - tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 - name: Check out the repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 @@ -67,4 +59,8 @@ jobs: - name: End-to-end test of installing bzip2 with EasyBuild shell: bash run: | - sudo -u easybuild bash -l -c "source /tmp/eb_env; eb bzip2-1.0.8.eb --trace --robot" + EB_ARGS='' + if [[ "${{ matrix.container }}" == "fedora-41" ]] || [[ "${{ matrix.container }}" == "ubuntu-24.04" ]]; then + EB_ARGS='--filter-deps=binutils' + fi + sudo -u easybuild bash -l -c "source /tmp/eb_env; eb bzip2-1.0.8.eb --trace --robot ${EB_ARGS}" From ccd481a40c59d69d7785c6fc95a874b4c1db085e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 4 Mar 2025 20:22:34 +0100 Subject: [PATCH 4/4] remove custom workflow for running test suite with Python 3.6, will be added via a separate PR --- .github/workflows/unit_tests_python36.yml | 82 ----------------------- 1 file changed, 82 deletions(-) delete mode 100644 .github/workflows/unit_tests_python36.yml diff --git a/.github/workflows/unit_tests_python36.yml b/.github/workflows/unit_tests_python36.yml deleted file mode 100644 index 0fc842c934..0000000000 --- a/.github/workflows/unit_tests_python36.yml +++ /dev/null @@ -1,82 +0,0 @@ -# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions -name: EasyBuild framework unit tests (Python 3.6) -on: [push, pull_request] - -permissions: - contents: read # to fetch code (actions/checkout) - -concurrency: - group: ${{format('{0}:{1}:{2}', github.repository, github.ref, github.workflow)}} - cancel-in-progress: true - -jobs: - test_python36: - runs-on: ubuntu-22.04 - container: - # Ubuntu 20.04 container that already includes Python 3.6 + Lmod & co, - # see https://github.com/easybuilders/easybuild-containers - image: ghcr.io/easybuilders/ubuntu-20.04-python36-amd64 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 - - - name: install Python packages - run: | - # Python packages - python3.6 -V - python3.6 -m pip --version - python3.6 -m pip install --upgrade pip - python3.6 -m pip --version - python3.6 -m pip install -r requirements.txt - # git config is required to make actual git commits (cfr. tests for GitRepository) - sudo -u easybuild git config --global user.name "GitHub Actions" - sudo -u easybuild git config --global user.email "actions@github.com" - sudo -u easybuild git config --get-regexp 'user.*' - - - name: install GitHub token (if available) - env: - # token (owned by @boegelbot) with gist permissions (required for some of the tests for GitHub integration); - # this token is not available in pull requests, so tests that require it are skipped in PRs, - # and are only run after the PR gets merged - GITHUB_TOKEN: ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}} - run: | - # tests that require a GitHub token are skipped automatically when no GitHub token is available - if [ ! -z $GITHUB_TOKEN ]; then - sudo -u easybuild python3.6 -c "import keyring; import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring()); keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')"; - echo "GitHub token installed!" - else - echo "Installation of GitHub token skipped!" - fi - - - name: install sources - run: | - # install from source distribution tarball, to test release as published on PyPI - python3.6 setup.py sdist - ls dist - export PREFIX=/tmp/$USER/$GITHUB_SHA - python3.6 -m pip install --prefix $PREFIX dist/easybuild-framework*tar.gz - - - name: run test suite - run: | - # run tests *outside* of checked out easybuild-framework directory, - # to ensure we're testing installed version (see previous step) - cd $HOME - # make sure 'eb' is available via $PATH, and that $PYTHONPATH is set (some tests expect that) - export PREFIX=/tmp/$USER/$GITHUB_SHA - ENV_CMDS="export PATH=$PREFIX/bin:$PATH; export PYTHONPATH=$PREFIX/lib/python3.6/site-packages:$PYTHONPATH" - ENV_CMDS="${ENV_CMDS}; export EB_VERBOSE=1; export EB_PYTHON=python3.6" - # run EasyBuild command via (non-root) easybuild user + login shell - sudo -u easybuild bash -l -c "${ENV_CMDS}; module --version; eb --version" - # show active EasyBuild configuration - sudo -u easybuild bash -l -c "${ENV_CMDS}; eb --show-config" - # gather some useful info on test system - sudo -u easybuild bash -l -c "${ENV_CMDS}; eb --show-system-info" - # check GitHub configuration - sudo -u easybuild bash -l -c "${ENV_CMDS}; eb --check-github --github-user=easybuild_test" - # create file owned by root but writable by anyone (used by test_copy_file) - sudo touch /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt - sudo chmod o+w /tmp/file_to_overwrite_for_easybuild_test_copy_file.txt - # run test suite (via easybuild user + login shell) - sudo -u easybuild bash -l -c "${ENV_CMDS}; python3.6 -O -m test.framework.suite" - # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set - # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7) - sudo -u easybuild bash -l -c "${ENV_CMDS}; export LC_ALL=C; python3.6 -O -m test.framework.suite"