Skip to content

Commit

Permalink
GH Actions: test latest python version (#2850)
Browse files Browse the repository at this point in the history
* GH Actions: stop scheduled tests as they're consistently failing

* GH Actions: test latest python

* Fix test for newer Python versions
  • Loading branch information
MetRonnie authored Jan 14, 2025
1 parent acee41b commit 7b8898e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ on:
cylc_rose_repo:
description: The cylc-rose repo to test against
required: false
schedule:
- cron: '37 04 * * 1-5' # 03:37, Monday-Friday
# schedule:
# - cron: '37 04 * * 1-5' # 04:37, Monday-Friday

defaults:
run:
Expand Down Expand Up @@ -82,9 +82,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04']
python-version: ['3.7', '3.8', '3.9']
os: ['ubuntu-latest']
python-version: ['3.8', '3.9', '3.x']
include:
- os: ubuntu-22.04
python-version: '3.7'
- os: 'macos-latest'
python-version: '3.8'

Expand Down
16 changes: 7 additions & 9 deletions t/rose-metadata-check/09-custom-macro.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#-------------------------------------------------------------------------------
# Test "rose metadata-check".
#-------------------------------------------------------------------------------
. $(dirname $0)/test_header
. "$(dirname "$0")/test_header"
#-------------------------------------------------------------------------------
tests 18
tests 20
#-------------------------------------------------------------------------------
# Check macro reference checking.
TEST_KEY=$TEST_KEY_BASE-import-simple-ok
Expand All @@ -30,7 +30,7 @@ init <<__META_CONFIG__
[namelist:macro_nl=my_macro_var1]
macro=envswitch.LogicalTransformer
__META_CONFIG__
init_macro envswitch.py < $TEST_SOURCE_DIR/lib/custom_macro.py
init_macro envswitch.py < "${TEST_SOURCE_DIR}/lib/custom_macro.py"
run_pass "$TEST_KEY" rose metadata-check -C ../config
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" </dev/null
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
Expand Down Expand Up @@ -115,14 +115,12 @@ init <<__META_CONFIG__
[namelist:macro_nl=my_macro_var1]
macro=envswitch.LogicalTransformer
__META_CONFIG__
init_macro envswitch.py < $TEST_SOURCE_DIR/lib/custom_macro_corrupt.py
init_macro envswitch.py < "${TEST_SOURCE_DIR}/lib/custom_macro_corrupt.py"
run_fail "$TEST_KEY" rose metadata-check -C ../config
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" </dev/null
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" <<'__ERROR__'
[V] rose.metadata_check.MetadataChecker: issues: 1
namelist:macro_nl=my_macro_var1=macro=envswitch.LogicalTransformer
Could not import envswitch.LogicalTransformer: IndentationError: expected an indented block (envswitch.py, line 33)
__ERROR__
file_grep "$TEST_KEY.err-1" '.*rose.metadata_check.MetadataChecker: issues: 1' "$TEST_KEY.err"
file_grep "$TEST_KEY.err-2" 'namelist:macro_nl=my_macro_var1=macro=envswitch.LogicalTransformer' "$TEST_KEY.err"
file_grep "$TEST_KEY.err-3" "Could not import envswitch.LogicalTransformer: IndentationError: expected an indented block.*(envswitch.py, line 33)" "$TEST_KEY.err"
teardown
#-------------------------------------------------------------------------------
exit

0 comments on commit 7b8898e

Please sign in to comment.