Skip to content

Commit

Permalink
removing go.sum from github workflow and adding unused pkg check (#1698)
Browse files Browse the repository at this point in the history
Signed-off-by: rajdas98 <mail.rajdas@gmail.com>
  • Loading branch information
imrajdas committed Mar 11, 2021
1 parent f5c2c30 commit 0864377
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 155 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Expand Up @@ -43,6 +43,10 @@ jobs:
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1

- name: Checking unused pkgs using go mod tidy
run: |
make unused-package-check
build-init-kyverno:
runs-on: ubuntu-latest
needs: pre-checks
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/go.sum

This file was deleted.

10 changes: 10 additions & 0 deletions Makefile
Expand Up @@ -20,6 +20,16 @@ LD_FLAGS="-s -w -X $(PACKAGE)/pkg/version.BuildVersion=$(GIT_VERSION) -X $(PACKA
# KYVERNO
##################################

.PHONY: unused-package-check
unused-package-check:
@echo "------------------"
@echo "--> Check unused packages for the all kyverno components"
@echo "------------------"
@tidy=$$(go mod tidy); \
if [ -n "$${tidy}" ]; then \
echo "go mod tidy checking failed!"; echo "$${tidy}"; echo; \
fi

KYVERNO_PATH:= cmd/kyverno
build: kyverno
PWD := $(CURDIR)
Expand Down
6 changes: 0 additions & 6 deletions go.mod
Expand Up @@ -7,19 +7,15 @@ require (
github.com/cornelk/hashmap v1.0.1
github.com/evanphx/json-patch/v5 v5.2.0
github.com/fatih/color v1.9.0
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gardener/controller-manager-library v0.2.0
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/go-git/go-billy/v5 v5.0.0
github.com/go-git/go-git/v5 v5.2.0
github.com/go-logr/logr v0.3.0
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/googleapis/gnostic v0.5.4
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
github.com/julienschmidt/httprouter v1.3.0
github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23
github.com/kr/pretty v0.2.0 // indirect
github.com/lensesio/tableprinter v0.0.0-20201125135848-89e81fc956e7
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a
github.com/mattn/go-isatty v0.0.12 // indirect
Expand All @@ -32,8 +28,6 @@ require (
github.com/sirupsen/logrus v1.6.0 // indirect
github.com/spf13/cobra v1.1.1
github.com/stretchr/testify v1.6.1
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
gotest.tools v2.2.0+incompatible
Expand Down

0 comments on commit 0864377

Please sign in to comment.