Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: test latest python version #2850

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
wxtim marked this conversation as resolved.
Show resolved Hide resolved
# - 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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording of this message has changed since Python 3.9

__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
Loading