oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package checks
2
3import "testing"
4
5// A Linux runner says honestly that it cannot check Apple code.
6func TestNeedsMacOS(t *testing.T) {
7 for _, tc := range []struct {
8 changed []string
9 gate string
10 want bool
11 }{
12 {[]string{"ios/Woodstar/AccountNavigationHost.swift"}, "./scripts/ci.sh", true},
13 {[]string{"ios/Woodstar.xcodeproj/project.pbxproj"}, "", true},
14 {[]string{"internal/x.go", "web/a.js"}, "go test ./...", false},
15 {[]string{"README.md"}, "xcodebuild test -scheme App", true},
16 {nil, "make ci", false},
17 } {
18 if got := NeedsMacOS(tc.changed, tc.gate); got != tc.want {
19 t.Fatalf("NeedsMacOS(%v, %q) = %v", tc.changed, tc.gate, got)
20 }
21 }
22}
23