@@ -345,7 +345,7 @@ def update_ci_workflow():
345345 test_steps = [
346346 {
347347 "name" : "\" Step 1: 初始化环境\" " ,
348- "run" : "python test_all.py --only-init 2>&1 | tee test_output_1_init.log"
348+ "run" : "python test_all.py --only-init" # 2>&1 | tee test_output_1_init.log"
349349 }
350350 ]
351351
@@ -354,21 +354,23 @@ def update_ci_workflow():
354354 # 添加直接测试步骤 (根据TESTS["direct"]生成)
355355 if TESTS ["direct" ]:
356356 for i , test in enumerate (TESTS ["direct" ]):
357- test_name = os .path .basename (test ).replace ("_test.go" , "" )
357+ # test_name = os.path.basename(test).replace("_test.go", "")
358+ test_name = test .replace ("/" , "-" ).replace ("_" , "-" ).replace (".go" , "" )
358359 test_steps .append ({
359360 "name" : f"\" Step { step_index } : { test_name } \" " ,
360- "run" : f"go test -v { test } 2>&1 | tee test_output_{ step_index } _{ test_name } .log" ,
361+ "run" : f"go test -v { test } " # 2>&1 | tee test_output_{step_index}_{test_name}.log",
361362 # "continue-on-error": True
362363 })
363364 step_index += 1
364365
365366 # 添加Docker测试步骤 (根据TESTS["in_docker"]生成)
366367 if TESTS ["in_docker" ]:
367368 for i , test in enumerate (TESTS ["in_docker" ]):
368- test_name = os .path .basename (test ).replace ("_test.go" , "" )
369+ # test_name = os.path.basename(test).replace("_test.go", "")
370+ test_name = test .replace ("/" , " " ).replace ("_" , "-" ).replace (".go" , "" )
369371 test_steps .append ({
370372 "name" : f"\" Step { step_index } : { test_name } \" " ,
371- "run" : f"docker exec telego-container go test ./{ test } -v 2>&1 | tee test_output_{ step_index } _{ test_name } .log" ,
373+ "run" : f"docker exec telego-container go test ./{ test } -v" , # 2>&1 | tee test_output_{step_index}_{test_name}.log",
372374 # "continue-on-error": True
373375 })
374376 step_index += 1
0 commit comments