-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
executable file
·49 lines (40 loc) · 1.01 KB
/
Taskfile.yml
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
version: "3"
env:
LOG_LEVEL: "debug"
tasks:
run:
desc: Runs the main application and supports passing CLI args
cmds:
- go run *.go {{ .CLI_ARGS }}
silent: false
build:
desc: Builds the backend binary
cmds:
- goreleaser build --snapshot --rm-dist
test:
desc: Runs all go tests using gotestsum - supports passing gotestsum args
cmds:
- gotestsum {{ .CLI_ARGS }} ./...
test:watch:
desc: Runs all go tests using gotestsum in watch mode
cmds:
- gotestsum --watch -- -v ./...
coverage:
desc: Runs all go tests with -race flag and generates a coverage report
cmds:
- go test -race -coverprofile=coverage.out -covermode=atomic ./... -v -cover
silent: true
tidy:
desc: Runs go mod tidy on the backend
cmds:
- go mod tidy
lint:
desc: Runs golangci-lint
cmds:
- golangci-lint run ./...
pr:
desc: Runs all go test and lint related tasks for PRs
cmds:
- task: tidy
- task: lint
- task: test