Skip to content

Commit 29a4502

Browse files
committed
gh: add easybuild-tests workflow
Check Modules changes against EasyBuild framework testsuite. Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 9bf50f1 commit 29a4502

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: easybuild-tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- c-main
7+
- c-3.2
8+
pull_request:
9+
10+
jobs:
11+
framework:
12+
strategy:
13+
matrix:
14+
module_syntax: [Tcl]
15+
runs-on: ubuntu-24.04
16+
env:
17+
EASYBUILD_MODULES_TOOL: EnvironmentModules
18+
EASYBUILD_MODULE_SYNTAX: ${{ matrix.module_syntax }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
- name: Install system packages
24+
run: |
25+
sudo apt-get -y update
26+
# package required to build and install Modules
27+
sudo apt-get install -y expect-dev dejagnu python3-sphinx gzip bash tcl python3
28+
# libtclenvmodules build requirements
29+
sudo apt-get install -y gcc autoconf tcl-dev
30+
# EasyBuild framework test requirement
31+
sudo apt-get install -y python3-pycodestyle python3-pygraphviz python3-autopep8
32+
- name: Build and Install Modules
33+
run: |
34+
./configure
35+
make
36+
sudo make install
37+
- name: Fetch EasyBuild framework
38+
run: |
39+
# need to setup repository in HOME for test_run_shell_cmd_fail to succeed
40+
cd $HOME
41+
git clone https://github.com/easybuilders/easybuild-framework.git
42+
cd easybuild-framework
43+
latest_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
44+
git switch --detach $latest_tag
45+
- name: Test EasyBuild framework suite with Modules
46+
run: |
47+
cd ${HOME}/easybuild-framework
48+
source /usr/local/Modules/init/bash
49+
export TEST_EASYBUILD_MODULES_TOOL=${EASYBUILD_MODULES_TOOL}
50+
export TEST_EASYBUILD_MODULE_SYNTAX=${EASYBUILD_MODULE_SYNTAX}
51+
export PYTHONPATH=$(pwd):$PYTHONPATH
52+
export PATH=$(pwd):$PATH
53+
# fake this is a pull request build to skip test_push_branch_to_github
54+
export GITHUB_EVENT_NAME=pull_request
55+
# record output in file to check test suite result
56+
python -m test.framework.suite 2>&1 | tee test_framework_suite.log
57+
tail -n 1 test_framework_suite.log | grep --quiet '^OK$'
58+
- uses: actions/upload-artifact@v4
59+
if: failure()
60+
with:
61+
name: easybuild-${{ matrix.module_syntax }}-tests-logs-${{ github.job }}
62+
path: /tmp/eb-*/eb-*/easybuild-tests-*.log
63+
retention-days: 5

.hunspell.en.dic

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,3 +1265,5 @@ atleast
12651265
atmost
12661266
autoswapping
12671267
clearlmod
1268+
EasyBuild
1269+
easybuild

0 commit comments

Comments
 (0)