forked from mikelorant/committed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
67 lines (56 loc) · 1.3 KB
/
Taskfile.yaml
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
65
66
67
version: '3'
tasks:
build:
desc: Build app.
cmds:
- go build -v -race
check:
desc: Format, lint and test app.
cmds:
- task: fmt
- task: lint
- task: test
test:
desc: Test app.
cmds:
- go test ./...
lint:
desc: Run Go, Docker and Markdown linters.
cmds:
- golangci-lint run ./...
- hadolint --failure-threshold error Dockerfile
- markdownlint --disable MD013 MD025 MD033 -- README.md
fmt:
desc: Format Go files.
cmds:
- gofumpt -l -w .
- goimports-reviser -rm-unused -format -imports-order=std,project,general,company ./...
release:
desc: Build release version.
cmds:
- go build -v -tags release
clean:
desc: Remove cache and temporary files.
cmds:
- go clean -testcache
- rm -f committed
- rm -f coverage.txt
- rm -rf dist
module:update:
desc: Update Go modules.
cmds:
- go get -u
module:tidy:
desc: Tidy Go modules.
cmds:
- go mod tidy
coverage:
desc: Generate Go coverage report.
cmds:
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- go tool cover -func=coverage.txt
- rm coverage.txt
docker:build:
desc: Build app image.
cmds:
- docker build --rm --tag committed .