-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yml
More file actions
54 lines (46 loc) · 1.19 KB
/
taskfile.yml
File metadata and controls
54 lines (46 loc) · 1.19 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
version: "3"
vars:
APP_BINARY: orderservice.exe
DOCKER_IMAGE: orderservice:local
tasks:
deps:
desc: Download all dependencies
env:
GOCACHE: "{{.USER_WORKING_DIR}}/.gocache"
GOMODCACHE: "{{.USER_WORKING_DIR}}/.gomodcache"
cmds:
- go mod download
build:
desc: Build local windows binary
env:
GOCACHE: "{{.USER_WORKING_DIR}}/.gocache"
GOMODCACHE: "{{.USER_WORKING_DIR}}/.gomodcache"
cmds:
- go build -o {{.APP_BINARY}} ./cmd
docker:build:
desc: Build docker image
cmds:
- docker build -t {{.DOCKER_IMAGE}} .
logs:
desc: Tail docker compose logs
cmds:
- docker compose logs -f app db
test:
desc: Run the tests
env:
GOCACHE: "{{.USER_WORKING_DIR}}/.gocache"
GOMODCACHE: "{{.USER_WORKING_DIR}}/.gomodcache"
cmds:
- go test ./...
lint:
desc: Run golangci-lint in docker
cmds:
- docker run --rm -v "{{.USER_WORKING_DIR}}:/app" -w /app golangci/golangci-lint:v2.5.0 golangci-lint run ./...
up:
desc: Start app and postgres in docker compose
cmds:
- docker compose up --build -d
down:
desc: Down docker containers
cmds:
- docker compose down