-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTaskfile.yml
More file actions
62 lines (52 loc) · 1.35 KB
/
Taskfile.yml
File metadata and controls
62 lines (52 loc) · 1.35 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
version: "3"
tasks:
default:
desc: Run all CI checks
cmds:
- task: ci
ci:
desc: Run full CI pipeline (build, test, lint, format check)
cmds:
- task: build
- task: test
- task: fmt:check
- task: build:examples
build:
desc: Build all packages and binaries
cmds:
- go build ./...
- go build -o bin/scaf ./cmd/scaf
- go build -o bin/scaf-lsp ./cmd/scaf-lsp
build:examples:
desc: Build example modules
dir: example
cmds:
- go build ./...
test:
desc: Run all tests
cmds:
- go test ./...
fmt:
desc: Format code with gofumpt and goimports
cmds:
- gofumpt -w .
- goimports -w .
fmt:check:
desc: Check code formatting
cmds:
- test -z "$(gofumpt -l .)" || (echo "Run 'task fmt' to fix formatting" && gofumpt -d . && exit 1)
- test -z "$(goimports -l .)" || (echo "Run 'task fmt' to fix imports" && goimports -d . && exit 1)
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run ./...
tools:install:
desc: Install required development tools
cmds:
- go install mvdan.cc/gofumpt@latest
- go install golang.org/x/tools/cmd/goimports@latest
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
clean:
desc: Clean build artifacts
cmds:
- rm -rf bin/