-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
64 lines (58 loc) · 1.4 KB
/
Taskfile.yml
File metadata and controls
64 lines (58 loc) · 1.4 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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
tasks:
build:
desc: Build the application
deps:
- generate
sources:
- "**/*.go"
- "**/*.html"
- "**/*.css"
- "**/*.yaml"
generates:
- .build/httb
cmds:
- go build -o .build/httb ./cmd/httb
run:
desc: Run the application with production settings
deps:
- build
cmds:
- .build/httb
dev:
desc: Run the application in development mode with auto-rebuild
watch: true
deps:
- build
env:
LOG_LEVEL: debug
cmds:
- .build/httb
generate:
desc: Generate code
aliases: [gen]
sources:
- assets/openapi.yaml
- .openapi/oapi-codegen.yml
generates:
- internal/pkg/api/api.go
cmds:
- go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=.openapi/oapi-codegen.yml assets/openapi.yaml
test:
desc: Run all tests
cmds:
- go test ./...
tdd:
desc: Test Driven Development - Watch tests
watch: true
sources:
- "**/*.go"
cmds:
- go test ./...
lint:
desc: Run all linters
cmds:
- go mod tidy
- go run github.com/bombsimon/wsl/v4/cmd/wsl --allow-cuddle-declarations --force-err-cuddling --force-case-trailing-whitespace 3 --fix ./...
- go run github.com/golangci/golangci-lint/cmd/golangci-lint run --fix