summaryrefslogtreecommitdiff
path: root/services/worker/Taskfile.yaml
blob: ea32aabecd6b030abf7c3d618e4471e6459ee62b (plain) (blame)
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
version: "3"

vars:
  BINARY: worker

tasks:
  default:
    desc: Build the application
    cmds:
      - task: build

  build:
    desc: Build the binary with optimisations
    cmds:
      - go build -ldflags="-s -w" -o {{.BINARY}} ./cmd/worker
    sources:
      - ./**/*.go
    generates:
      - ./{{.BINARY}}

  run:
    desc: Build and run the application
    deps: [build]
    cmds:
      - ./{{.BINARY}}

  clean:
    desc: Remove build artifacts
    cmds:
      - rm -f {{.BINARY}}
      - go clean

  test:
    desc: Run tests
    cmds:
      - go test ./...

  fmt:
    desc: Format code
    cmds:
      - iku -w . || go fmt ./...

  lint:
    desc: Run linter
    cmds:
      - golangci-lint run

  dev:
    desc: Build and run in development mode
    cmds:
      - go run ./cmd/worker

  tidy:
    desc: Tidy and verify module dependencies
    cmds:
      - go mod tidy
      - go mod verify