-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
99 lines (84 loc) · 1.99 KB
/
Copy pathTaskfile.yml
File metadata and controls
99 lines (84 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: "3"
vars:
BIN_DIR: bin
SPIND_BIN: "{{.BIN_DIR}}/spind"
GUEST_AGENT_BIN: "{{.BIN_DIR}}/spind-guest-agent"
tasks:
default:
desc: List available tasks
cmds:
- task --list
# Quality gates
check:
desc: Run all checks
cmds:
- task: format:check
- task: lint
- task: typecheck
- task: test
ci:
desc: Run CI pipeline (frozen install + all checks)
cmds:
- bun install --frozen-lockfile
- task: check
ci:macos:
desc: Run macOS CI pipeline (frozen install + e2e)
cmds:
- bun install --frozen-lockfile
- task: e2e
format:
desc: Format source files
cmds:
- bunx oxfmt --write .
format:check:
desc: Check source formatting
cmds:
- bunx oxfmt --check .
lint:
desc: Run the linter
cmds:
- bunx oxlint
test:
desc: Run Go tests
cmds:
- go list ./... | grep -v '/node_modules/' | xargs go test
typecheck:
desc: Type check without emitting
cmds:
- bunx tsc -b --noEmit
# Build tasks
build:
desc: Build local spind binaries
cmds:
- mkdir -p {{.BIN_DIR}}
- go build -o {{.SPIND_BIN}} ./cmd/spind
- CGO_ENABLED=0 GOOS=linux GOARCH="$(go env GOARCH)" go build -o {{.GUEST_AGENT_BIN}} ./cmd/agent
- |
if [ "$(uname -s)" = "Darwin" ]; then
{{.SPIND_BIN}} prepare-vz-runner
else
echo "skipping managed Virtualization.framework runner build on $(uname -s)"
fi
build:ts:
desc: Build TypeScript files
cmds:
- bunx tsc -b
build-image-docker:
desc: Build the Docker image
deps:
- build
cmds:
- "{{.SPIND_BIN}} image build docker --force"
clean:
desc: Clean build artifacts
cmds:
- rm -rf js *.tsbuildinfo
# End-to-end tests
e2e:
desc: Run end-to-end tests
deps:
- build-image-docker
cmds:
- bun test tests/e2e --timeout 2700000 --bail
env:
EXECA_VERBOSE: short # "short" | "full" | "none"