feat: 隔离 VM 集成测试标签
test / shell (pull_request) Successful in 21s
test / go (pull_request) Successful in 5m12s
test / python (pull_request) Failing after 11m44s

This commit is contained in:
2026-09-21 08:50:18 +00:00
parent 70c5ff422f
commit 48b6b8038e
6 changed files with 14 additions and 5 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ func backendFromTask(task *runnerv1.Task) (Backend, error) {
return "", fmt.Errorf("task runs-on labels must include self-hosted: %v", labels)
}
hasPod := slices.Contains(labels, string(BackendPod))
hasVM := slices.Contains(labels, string(BackendVM))
hasVM := slices.Contains(labels, string(BackendVM)) || slices.Contains(labels, "vm-dev")
if hasPod == hasVM {
return "", fmt.Errorf("task runs-on labels must select exactly one of pod or vm: %v", labels)
}
@@ -28,6 +28,7 @@ func TestNewSelectsBackendFromRunsOn(t *testing.T) {
}{
{"[self-hosted, pod]", BackendPod},
{"[self-hosted, vm]", BackendVM},
{"[self-hosted, vm-dev]", BackendVM},
} {
assignment, err := New(task(t, test.labels), "ddupan.top")
if err != nil {