Skip to content

Commit

Permalink
Merge pull request #3616 from Flamefire/improve_gha
Browse files Browse the repository at this point in the history
Refactor the CI configuration to use inclusion instead of exclusion
  • Loading branch information
boegel authored Mar 31, 2021
2 parents 6a5fca3 + 8999ed1 commit f215ae5
Showing 1 changed file with 52 additions and 43 deletions.
95 changes: 52 additions & 43 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,70 @@
name: EasyBuild framework unit tests
on: [push, pull_request]
jobs:
setup:
runs-on: ubuntu-latest
outputs:
lmod7: Lmod-7.8.22
lmod8: Lmod-8.4.27
modulesTcl: modules-tcl-1.147
modules3: modules-3.2.10
modules4: modules-4.1.4
steps:
- run: "true"
build:
needs: setup
runs-on: ubuntu-18.04
strategy:
matrix:
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
modules_tool: [Lmod-7.8.22, Lmod-8.2.9, modules-tcl-1.147, modules-3.2.10, modules-4.1.4]
python: [2.7, 3.6]
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
- ${{needs.setup.outputs.lmod7}}
- ${{needs.setup.outputs.lmod8}}
- ${{needs.setup.outputs.modulesTcl}}
- ${{needs.setup.outputs.modules3}}
- ${{needs.setup.outputs.modules4}}
module_syntax: [Lua, Tcl]
lc_all: [""]
# exclude some configuration for non-Lmod modules tool:
# - don't test with Lua module syntax (only supported in Lmod)
# - exclude Python 3.x versions other than 3.6, to limit test configurations
# don't test with Lua module syntax (only supported in Lmod)
exclude:
- modules_tool: modules-tcl-1.147
- modules_tool: ${{needs.setup.outputs.modulesTcl}}
module_syntax: Lua
- modules_tool: modules-3.2.10
- modules_tool: ${{needs.setup.outputs.modules3}}
module_syntax: Lua
- modules_tool: modules-4.1.4
- modules_tool: ${{needs.setup.outputs.modules4}}
module_syntax: Lua
- modules_tool: modules-tcl-1.147
python: 3.5
- modules_tool: modules-tcl-1.147
python: 3.7
- modules_tool: modules-tcl-1.147
python: 3.8
- modules_tool: modules-tcl-1.147
python: 3.9
- modules_tool: modules-3.2.10
python: 3.5
- modules_tool: modules-3.2.10
python: 3.7
- modules_tool: modules-3.2.10
python: 3.8
- modules_tool: modules-3.2.10
python: 3.9
- modules_tool: modules-4.1.4
python: 3.5
- modules_tool: modules-4.1.4
python: 3.7
- modules_tool: modules-4.1.4
python: 3.8
- modules_tool: modules-4.1.4
python: 3.9
- modules_tool: Lmod-7.8.22
python: 3.5
- modules_tool: Lmod-7.8.22
python: 3.7
- modules_tool: Lmod-7.8.22
python: 3.8
- modules_tool: Lmod-7.8.22
python: 3.9
# 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)
include:
# Test different Python 3 versions with Lmod 8.x (with both Lua and Tcl module syntax)
- python: 3.5
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Lua
- python: 3.5
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Tcl
- python: 3.7
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Lua
- python: 3.7
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Tcl
- python: 3.8
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Lua
- python: 3.8
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Tcl
- python: 3.9
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Lua
- python: 3.9
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Tcl
# 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: Lmod-8.2.9
modules_tool: ${{needs.setup.outputs.lmod8}}
module_syntax: Lua
lc_all: C
fail-fast: false
Expand Down

0 comments on commit f215ae5

Please sign in to comment.