Skip to content

Commit 3de156e

Browse files
author
Kejilion Assistant
committed
fix: strip heredoc indentation in CI expect script
1 parent 38bb12d commit 3de156e

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/test-apps.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
echo "No .conf file modified, skipping test."
2525
exit 0
2626
fi
27-
27+
2828
echo "Testing App: $APP_NAME"
29-
30-
cat <<'EOF' > test.exp
29+
30+
cat <<'EXPECT_EOF' > test.exp
3131
set timeout 900
3232
set app [lindex $argv 0]
3333
spawn bash -c "curl -sL kejilion.sh | bash -s app $app"
34-
34+
3535
expect "请输入编号" { send "$app\r" }
36-
36+
3737
# 依次执行: 4(状态), 1(安装), 3(更新), 2(卸载)
3838
foreach op {4 1 3 2} {
3939
expect "1. 安装应用" { send "$op\r" }
@@ -44,10 +44,13 @@ jobs:
4444
"1. 安装应用" { }
4545
}
4646
}
47-
47+
4848
expect "1. 安装应用" { send "0\r" }
4949
expect "返回主菜单" { send "0\r" }
5050
expect eof
51-
EOF
51+
EXPECT_EOF
52+
53+
# Remove leading whitespace from heredoc (YAML indentation artifact)
54+
sed -i 's/^ //' test.exp
5255
expect test.exp $APP_NAME
5356
docker ps -a

0 commit comments

Comments
 (0)