@@ -11,38 +11,29 @@ tasks:
1111 desc : Workflow to run in CI
1212 cmds :
1313 - task : workspace
14- - task : install-gofumpt
15- - task : install-golangci-lint
1614 - task : lint
1715 - task : test
1816
1917 lint :
2018 desc : Formatting and linting
2119 dir : " {{.SRC_DIR}}"
2220 cmds :
23- - test -z "$(gofumpt -d -e . | tee /dev/stderr)"
21+ - test -z "$(go tool gofumpt -d -e . | tee /dev/stderr)"
2422 - go vet ./...
25- - golangci-lint run
23+ - go tool golangci-lint run
2624
2725 fix :
2826 desc : Fix formatting and linting
2927 dir : " {{.SRC_DIR}}"
3028 cmds :
3129 - task : update-opslevel-go
32- - gofumpt -w .
30+ - go tool gofumpt -w .
3331 - go mod tidy
34- - golangci-lint run --fix
32+ - go tool golangci-lint run --fix
3533
3634 setup :
37- desc : Setup linter, formatter, etc. for local testing and CI
35+ desc : Setup workspace for local development
3836 cmds :
39- - cmd : echo "Installing development tools..."
40- silent : true
41- - task : install-changie
42- - task : install-gofumpt
43- - task : install-golangci-lint
44- - cmd : echo "Development tools installed!"
45- silent : true
4637 - task : workspace
4738
4839 test :
@@ -74,56 +65,12 @@ tasks:
7465 desc : Start Faktory and opslevel-runner in faktory mode
7566 dir : " {{.SRC_DIR}}"
7667 deps :
77- - install-goreman
7868 - install-faktory
7969 cmds :
80- - goreman start
70+ - go tool goreman start
8171
8272 # internal (not directly called) tasks
8373
84- go-install-tool :
85- desc : go install '{{.GO_TOOL}}' and set GOBIN if not set
86- internal : true
87- silent : true
88- vars :
89- IS_TOOL_INSTALLED :
90- sh : which {{.GO_TOOL}} > /dev/null || echo "1"
91- cmds :
92- - test -z "{{.IS_TOOL_INSTALLED}}" || echo "Installing {{.GO_TOOL}}..."
93- - test -z "{{.IS_TOOL_INSTALLED}}" || go install {{.GO_TOOL_PATH}}
94- - test -n $(go env GOBIN) || go env -w GOBIN=$(go env GOPATH)/bin
95- - echo " '{{.GO_TOOL}}' is installed."
96- requires :
97- vars : [GO_TOOL, GO_TOOL_PATH]
98-
99- install-changie :
100- desc : go install "changie"
101- internal : true
102- cmds :
103- - task : go-install-tool
104- vars : { GO_TOOL: "changie", GO_TOOL_PATH: "github.com/miniscruff/changie@v1.23.0" }
105-
106- install-gofumpt :
107- desc : go install "gofumpt"
108- internal : true
109- cmds :
110- - task : go-install-tool
111- vars : { GO_TOOL: "gofumpt", GO_TOOL_PATH: "mvdan.cc/gofumpt@latest" }
112-
113- install-golangci-lint :
114- desc : go install "golangci-lint"
115- internal : true
116- cmds :
117- - task : go-install-tool
118- vars : { GO_TOOL: "golangci-lint", GO_TOOL_PATH: "github.com/golangci/golangci-lint/cmd/golangci-lint@latest" }
119-
120- install-goreman :
121- desc : go install "goreman"
122- internal : true
123- cmds :
124- - task : go-install-tool
125- vars : { GO_TOOL: "goreman", GO_TOOL_PATH: "github.com/mattn/goreman@latest" }
126-
12774 install-redis :
12875 desc : install "redis-server"
12976 internal : true
0 commit comments