You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Taskfile.yml
+13-9Lines changed: 13 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
version: "3"
1
+
version: '3'
2
2
3
3
vars:
4
4
APP_NAME: tempo
@@ -8,13 +8,13 @@ vars:
8
8
9
9
tasks:
10
10
default:
11
-
desc: "Run clean and build tasks"
11
+
desc: 'Run clean and build tasks'
12
12
cmds:
13
13
- task: clean
14
14
- task: build
15
15
16
16
clean:
17
-
desc: "Clean the build directory and Go cache"
17
+
desc: 'Clean the build directory and Go cache'
18
18
cmds:
19
19
- rm -rf {{.BUILD_DIR}}
20
20
- go clean -cache
@@ -23,23 +23,23 @@ tasks:
23
23
desc: Run all tests and generate coverage report.
24
24
silent: false
25
25
cmds:
26
-
- go test -count=1 -timeout 30s $(go list ./... | grep -Ev 'internal/testhelpers|internal/testutils|internal/templates') -covermode=atomic -coverprofile=profile.cov
26
+
- go test -count=1 -timeout 30s $(go list ./... | grep -Ev 'internal/testhelpers|internal/testutils|internal/templates') -covermode=atomic -coverprofile=coverage.txt
27
27
- task: test/view-total-coverage
28
28
29
29
test/view-total-coverage:
30
-
desc: Display total test coverage from profile.cov
30
+
desc: Display total test coverage from coverage.txt
31
31
silent: true
32
32
internal: true
33
33
cmds:
34
34
- echo ""
35
35
- echo "Total Coverage:"
36
-
- go tool cover -func=profile.cov | grep total | awk -F '[[:space:]]+' '{print $NF}'
36
+
- go tool cover -func=coverage.txt | grep total | awk -F '[[:space:]]+' '{print $NF}'
37
37
38
38
test/view-coverage:
39
39
desc: View the HTML coverage report.
40
40
internal: true
41
41
cmds:
42
-
- go tool cover -html=profile.cov
42
+
- go tool cover -html=coverage.txt
43
43
- echo "Coverage report displayed in your default browser."
44
44
45
45
test/coverage:
@@ -70,14 +70,18 @@ tasks:
70
70
- golangci-lint run ./...
71
71
72
72
build:
73
-
desc: "Building the binary..."
73
+
desc: 'Building the binary...'
74
+
deps:
75
+
- modernize
76
+
- lint
77
+
- test/force
74
78
cmds:
75
79
- |
76
80
mkdir -p {{.BUILD_DIR}}
77
81
go build -o {{.BUILD_DIR}}/{{.APP_NAME}} {{.CMD_DIR}}/main.go
0 commit comments