From 5bc0f97797aa23eb8131436718ae01723163dc2a Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Sat, 7 Feb 2026 07:37:10 +1000 Subject: [PATCH] CI: avoid heredoc EOF parsing in nodeid step --- .github/workflows/build-ultraplot.yml | 36 ++++++++++++--------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-ultraplot.yml b/.github/workflows/build-ultraplot.yml index cec61da39..b1d71002c 100644 --- a/.github/workflows/build-ultraplot.yml +++ b/.github/workflows/build-ultraplot.yml @@ -135,26 +135,22 @@ jobs: echo "TEST_NODEIDS=${TEST_NODEIDS}" # Save PR-selected nodeids for reuse after checkout (if provided) if [ "${TEST_MODE}" = "selected" ] && [ -n "${TEST_NODEIDS}" ]; then - python - <<'PY' - import json - import os - - raw = os.environ.get("TEST_NODEIDS", "").strip() - nodeids = [] - if raw and raw != "[]": - try: - parsed = json.loads(raw) - except json.JSONDecodeError: - parsed = raw.split() - if isinstance(parsed, str): - parsed = [parsed] - if isinstance(parsed, list): - nodeids = [item for item in parsed if isinstance(item, str) and item] - with open("/tmp/pr_selected_nodeids.txt", "w", encoding="utf-8") as fh: - for nodeid in nodeids: - fh.write(f"{nodeid}\n") - print(f"Selected nodeids parsed: {len(nodeids)}") - PY + python -c 'import json, os +raw = os.environ.get("TEST_NODEIDS", "").strip() +nodeids = [] +if raw and raw != "[]": + try: + parsed = json.loads(raw) + except json.JSONDecodeError: + parsed = raw.split() + if isinstance(parsed, str): + parsed = [parsed] + if isinstance(parsed, list): + nodeids = [item for item in parsed if isinstance(item, str) and item] +with open("/tmp/pr_selected_nodeids.txt", "w", encoding="utf-8") as fh: + for nodeid in nodeids: + fh.write(f"{nodeid}\n") +print(f"Selected nodeids parsed: {len(nodeids)}")' else : > /tmp/pr_selected_nodeids.txt fi