Skip to content

Commit b49b1f9

Browse files
committed
Run the up-to-date check last
1 parent 21b0d82 commit b49b1f9

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

.github/workflows/test-eb-hooks.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,25 @@ jobs:
3535
eessi_stack_version: ${{matrix.EESSI_VERSION}}
3636
use_eessi_module: true
3737

38+
- name: Test that toolchain verification check works
39+
if: ${{ github.event_name == 'pull_request' }}
40+
run: |
41+
# Set up some environment variables
42+
export COMPATIBLE_EASYCONFIG=${{matrix.COMPATIBLE_EASYCONFIG}}
43+
export INCOMPATIBLE_EASYCONFIG=${{matrix.INCOMPATIBLE_EASYCONFIG}}
44+
45+
# Load specific EESSI-extend vertsion (proxies a version check)
46+
module load EESSI-extend/${{matrix.EESSI_VERSION}}-easybuild
47+
48+
# Test an easyconfig that should work
49+
eb --hooks=$PWD/eb_hooks.py "$COMPATIBLE_EASYCONFIG" --stop fetch
50+
51+
# Pick an outdated toolchain for the negative test
52+
eb --hooks=$PWD/eb_hooks.py "$INCOMPATIBLE_EASYCONFIG" --stop fetch 2>&1 1>/dev/null | grep -q "not supported in EESSI"
53+
54+
# Check the override works
55+
EESSI_OVERRIDE_TOOLCHAIN_CHECK=1 eb --hooks=$PWD/eb_hooks.py "$INCOMPATIBLE_EASYCONFIG" --stop fetch
56+
3857
- name: Check that EasyBuild hook is up to date
3958
if: ${{ github.event_name == 'pull_request' }}
4059
run: |
@@ -59,22 +78,3 @@ jobs:
5978
# Compare the hooks to what is shipped in the repository
6079
module load EESSI-extend
6180
diff "$TEMP_FILE" "$EASYBUILD_HOOKS"
62-
63-
- name: Test that toolchain verification check works
64-
if: ${{ github.event_name == 'pull_request' }}
65-
run: |
66-
# Set up some environment variables
67-
export COMPATIBLE_EASYCONFIG=${{matrix.COMPATIBLE_EASYCONFIG}}
68-
export INCOMPATIBLE_EASYCONFIG=${{matrix.INCOMPATIBLE_EASYCONFIG}}
69-
70-
# Load specific EESSI-extend vertsion (proxies a version check)
71-
module load EESSI-extend/${{matrix.EESSI_VERSION}}-easybuild
72-
73-
# Test an easyconfig that should work
74-
eb --hooks=$PWD/eb_hooks.py "$COMPATIBLE_EASYCONFIG" --stop fetch
75-
76-
# Pick an outdated toolchain for the negative test
77-
eb --hooks=$PWD/eb_hooks.py "$INCOMPATIBLE_EASYCONFIG" --stop fetch 2>&1 1>/dev/null | grep -q "not supported in EESSI"
78-
79-
# Check the override works
80-
EESSI_OVERRIDE_TOOLCHAIN_CHECK=1 eb --hooks=$PWD/eb_hooks.py "$INCOMPATIBLE_EASYCONFIG" --stop fetch

0 commit comments

Comments
 (0)