Skip to content

Commit e492909

Browse files
committed
ci(workflow): 修复测试脚本路径并移除工作目录设置
fix test script path and remove working directory setting
1 parent 2ee7ef4 commit e492909

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/go-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737
run: |
3838
echo "port=8080" > backup.conf
3939
echo "callback_secret=my-test-secret" >> backup.conf
40-
echo "scriptpath=../../test-script.sh" >> backup.conf
41-
echo "#!/bin/bash" > ../../test-script.sh
42-
echo 'echo "script output"' >> ../../test-script.sh
43-
chmod +x ../../test-script.sh
40+
echo "scriptpath=./test-script.sh" >> backup.conf
41+
echo "#!/bin/bash" > test-script.sh
42+
echo 'echo "script output"' >> test-script.sh
43+
chmod +x test-script.sh
4444
4545
- name: Run integration test
4646
run: |

go/callback/internal/runner/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func Run(scriptPath string, args []string) ([]byte, error) {
1313

1414
// Execute the backup script with args
1515
cmd := exec.Command("/bin/bash", cmdArgs...)
16-
cmd.Dir = "../.." // Set working directory to project root
16+
// cmd.Dir = "../.." // Set working directory to project root (commented out)
1717
output, err := cmd.CombinedOutput()
1818
if err != nil {
1919
return output, fmt.Errorf("failed to execute backup script: %w\nOutput: %s", err, string(output))

0 commit comments

Comments
 (0)