Skip to content

Commit 1b23831

Browse files
committed
Avoid repetition of module tool versions
1 parent af0b3b6 commit 1b23831

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

.github/workflows/unit_tests.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,68 @@
22
name: EasyBuild framework unit tests
33
on: [push, pull_request]
44
jobs:
5+
setup:
6+
runs-on: ubuntu-latest
7+
outputs:
8+
lmod7: Lmod-7.8.22
9+
lmod8: Lmod-8.4.27
10+
modulesTcl: modules-tcl-1.147
11+
modules3: modules-3.2.10
12+
modules4: modules-4.1.4
13+
steps:
14+
- run: "true"
515
build:
16+
needs: setup
617
runs-on: ubuntu-18.04
718
strategy:
819
matrix:
920
python: [2.7, 3.6]
10-
modules_tool: [Lmod-7.8.22, Lmod-8.4.27, modules-tcl-1.147, modules-3.2.10, modules-4.1.4]
21+
modules_tool:
22+
- ${{needs.setup.outputs.lmod7}}
23+
- ${{needs.setup.outputs.lmod8}}
24+
- ${{needs.setup.outputs.modulesTcl}}
25+
- ${{needs.setup.outputs.modules3}}
26+
- ${{needs.setup.outputs.modules4}}
1127
module_syntax: [Lua, Tcl]
1228
lc_all: [""]
1329
# don't test with Lua module syntax (only supported in Lmod)
1430
exclude:
15-
- modules_tool: modules-tcl-1.147
31+
- modules_tool: ${{needs.setup.outputs.modulesTcl}}
1632
module_syntax: Lua
17-
- modules_tool: modules-3.2.10
33+
- modules_tool: ${{needs.setup.outputs.modules3}}
1834
module_syntax: Lua
19-
- modules_tool: modules-4.1.4
35+
- modules_tool: ${{needs.setup.outputs.modules4}}
2036
module_syntax: Lua
2137
include:
2238
# Test different Python versions with Lmod 8.x (with both Lua and Tcl module syntax)
2339
- python: 3.5
24-
modules_tool: Lmod-8.4.27
40+
modules_tool: ${{needs.setup.outputs.lmod8}}
2541
module_syntax: Lua
2642
- python: 3.5
27-
modules_tool: Lmod-8.4.27
43+
modules_tool: ${{needs.setup.outputs.lmod8}}
2844
module_syntax: Tcl
2945
- python: 3.7
30-
modules_tool: Lmod-8.4.27
46+
modules_tool: ${{needs.setup.outputs.lmod8}}
3147
module_syntax: Lua
3248
- python: 3.7
33-
modules_tool: Lmod-8.4.27
49+
modules_tool: ${{needs.setup.outputs.lmod8}}
3450
module_syntax: Tcl
3551
- python: 3.8
36-
modules_tool: Lmod-8.4.27
52+
modules_tool: ${{needs.setup.outputs.lmod8}}
3753
module_syntax: Lua
3854
- python: 3.8
39-
modules_tool: Lmod-8.4.27
55+
modules_tool: ${{needs.setup.outputs.lmod8}}
4056
module_syntax: Tcl
4157
- python: 3.9
42-
modules_tool: Lmod-8.4.27
58+
modules_tool: ${{needs.setup.outputs.lmod8}}
4359
module_syntax: Lua
4460
- python: 3.9
45-
modules_tool: Lmod-8.4.27
61+
modules_tool: ${{needs.setup.outputs.lmod8}}
4662
module_syntax: Tcl
4763
# There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set
4864
# Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7)
4965
- python: 3.6
50-
modules_tool: Lmod-8.4.27
66+
modules_tool: ${{needs.setup.outputs.lmod8}}
5167
module_syntax: Lua
5268
lc_all: C
5369
fail-fast: false

0 commit comments

Comments
 (0)