From 9a054c871e5d15e993eeb4d18760f0bf192bc461 Mon Sep 17 00:00:00 2001 From: Theo-Hafsaoui Date: Sat, 7 Sep 2024 15:25:09 +0200 Subject: [PATCH] Improve CI --- .github/workflows/lint.yml | 3 +++ Makefile | 3 +++ go.mod | 5 ++--- go.sum | 4 ---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2b37bd2..28bcd7c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,3 +24,6 @@ jobs: - name: Run linter run: make lint + - name: Check dependency + run: go mod tidy && git diff --exit-code + diff --git a/Makefile b/Makefile index 2a6dfa8..3dd0a92 100644 --- a/Makefile +++ b/Makefile @@ -8,5 +8,8 @@ build: lint: golangci-lint run ./... +tidy: + go mod tidy + test: go test ./... diff --git a/go.mod b/go.mod index 1b93505..7510094 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,9 @@ module anemon go 1.22.0 +require github.com/spf13/cobra v1.8.1 + require ( - github.com/google/go-cmp v0.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/text v0.18.0 // indirect ) diff --git a/go.sum b/go.sum index 01e000a..912390a 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,4 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -8,7 +6,5 @@ github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=