fuzzyworld

template / commit

CI pasta time!

14a9913ed1de6bdec63af37ed6de17844c3d3ac0 · Pavel Safronov · 2022-11-15 22:45:35 -0800 · parents b954384b8761

CI pasta time!
 .gitlab-ci.yml | 4 ++--
 Makefile       | 3 ++-
 go.mod         | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 792a000..fd5ed21 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,8 +27,8 @@ stages:          # List of stages for jobs, and their order of execution
 prepare:
   stage: prep
   script:
-    - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1
-    - $(go env GOPATH)/bin/golangci-lint --version
+    - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.50.1
+    - golangci-lint --version
 
 build-job:       # This job runs in the build stage, which runs first.
   stage: build
diff --git a/Makefile b/Makefile
index fe95e43..b0aa3bd 100644
--- a/Makefile
+++ b/Makefile
@@ -9,10 +9,11 @@ clean:
 	go clean
 
 build:
+	go mod tidy
 	go build .
 
 lint: build
-	$(go env GOPATH)/bin/golangci-lint run
+	golangci-lint run
 
 test: build
 	mkdir -p test
diff --git a/go.mod b/go.mod
index 4288d69..7cd85b7 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,7 @@ module gitlab.com/fuzzy-rp/template
 go 1.19
 
 require (
+	github.com/sirupsen/logrus v1.9.0
 	github.com/stretchr/testify v1.8.0
 	github.com/urfave/cli/v2 v2.16.3
 	golang.org/x/exp v0.0.0-20220921164117-439092de6870
@@ -14,7 +15,6 @@ require (
 	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/russross/blackfriday/v2 v2.1.0 // indirect
-	github.com/sirupsen/logrus v1.9.0 // indirect
 	github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
 	golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
 )