@@ -4,6 +4,20 @@ includes:
4
4
dist : ./DistTasks.yml
5
5
6
6
tasks :
7
+ build :
8
+ desc : Build the project
9
+ deps :
10
+ - task : go:build
11
+
12
+ check :
13
+ desc : Check fmt and lint
14
+ cmds :
15
+ - test -z $(go fmt ./...)
16
+ - go vet ./...
17
+ - task : go:lint
18
+ - task : config:check
19
+ - task : general:check-formatting
20
+
7
21
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml
8
22
general:cache-dep-licenses :
9
23
desc : Cache dependency license metadata
@@ -29,6 +43,25 @@ tasks:
29
43
cmds :
30
44
- licensed status
31
45
46
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-general-formatting-task/Taskfile.yml
47
+ general:check-formatting :
48
+ desc : Check basic formatting style of all files
49
+ cmds :
50
+ - |
51
+ if ! which ec &>/dev/null; then
52
+ echo "ec not found or not in PATH."
53
+ echo "Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
54
+ exit 1
55
+ fi
56
+ - ec
57
+
58
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go-task/Taskfile.yml
59
+ go:build :
60
+ desc : Build the Go code
61
+ dir : " {{.DEFAULT_GO_MODULE_PATH}}"
62
+ cmds :
63
+ - go build -v {{.LDFLAGS}}
64
+
32
65
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
33
66
go:fix :
34
67
desc : Modernize usages of outdated APIs
@@ -58,31 +91,6 @@ tasks:
58
91
{{default "-min_confidence 0.8 -set_exit_status" .GO_LINT_FLAGS}} \
59
92
{{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
60
93
61
- # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go-task/Taskfile.yml
62
- go:build :
63
- desc : Build the Go code
64
- dir : " {{.DEFAULT_GO_MODULE_PATH}}"
65
- cmds :
66
- - go build -v {{.LDFLAGS}}
67
-
68
- # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
69
- go:vet :
70
- desc : Check for errors in Go code
71
- dir : " {{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
72
- cmds :
73
- - go vet {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
74
-
75
- build :
76
- desc : Build the project
77
- deps :
78
- - task : go:build
79
-
80
- test :
81
- desc : Run tests
82
- cmds :
83
- - task : test-unit
84
- - task : go:test-integration
85
-
86
94
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-task/Taskfile.yml
87
95
go:test :
88
96
desc : Run unit tests
@@ -99,26 +107,18 @@ tasks:
99
107
{{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}} \
100
108
{{.TEST_LDFLAGS}}
101
109
102
- check :
103
- desc : Check fmt and lint
110
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
111
+ go:vet :
112
+ desc : Check for errors in Go code
113
+ dir : " {{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
104
114
cmds :
105
- - test -z $(go fmt ./...)
106
- - go vet ./...
107
- - task : go:lint
108
- - task : config:check
109
- - task : general:check-formatting
115
+ - go vet {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
110
116
111
- # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-general-formatting-task/Taskfile.yml
112
- general:check-formatting :
113
- desc : Check basic formatting style of all files
117
+ test :
118
+ desc : Run tests
114
119
cmds :
115
- - |
116
- if ! which ec &>/dev/null; then
117
- echo "ec not found or not in PATH."
118
- echo "Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
119
- exit 1
120
- fi
121
- - ec
120
+ - task : test-unit
121
+ - task : go:test-integration
122
122
123
123
vars :
124
124
PROJECT_NAME : " uno-r4-wifi-fwuploader-plugin"
0 commit comments