Skip to content

Commit

Permalink
Sync files with networkservicemesh/cmd-template
Browse files Browse the repository at this point in the history
This PR syncs files with https://github.com/networkservicemesh/cmd-template

Revision: https://github.com/networkservicemesh/cmd-template/commits/f243447d4defc65d3db137add05171ce9ef38add

commit f243447d4defc65d3db137add05171ce9ef38add
Author: Vladimir Popov <[email protected]>
Date:   Wed Mar 10 19:30:25 2021 +0700

    Update CI checks (#63)

    * Update CI checks

    Signed-off-by: Vladimir Popov <[email protected]>

    * Fix go generate check

    Signed-off-by: Vladimir Popov <[email protected]>

Signed-off-by: NSMBot <[email protected]>
  • Loading branch information
NSMBot committed Mar 10, 2021
1 parent a1fbc45 commit 6eb1167
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- uses: actions/checkout@v2
- name: Restrict dependencies on github.com/networkservicemesh/*
env:
ALLOWED_REPOSITORIES: "sdk, api, sdk-k8s, sdk-vppagent, sdk-sriov"
ALLOWED_REPOSITORIES: "sdk, api, sdk-k8s, sdk-vpp, sdk-sriov"
run: |
for i in $(grep github.com/networkservicemesh/ go.mod | grep -v '^module' | sed 's;.*\(github.com\/networkservicemesh\/[^ ]*\).*;\1;g');do
if ! [ "$(echo ${ALLOWED_REPOSITORIES} | grep ${i#github.com/networkservicemesh/})" ]; then
Expand All @@ -85,40 +85,30 @@ jobs:
done
checkgomod:
name: check go.mod and go.sum
name: Check go.mod and go.sum
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.15
- run: go mod tidy
- name: Check for changes in go.mod or go.sum
- name: Check for changes
run: |
git diff --name-only --exit-code go.mod || ( echo "Run go tidy" && false )
git diff --name-only --exit-code go.sum || ( echo "Run go tidy" && false )
git diff --name-only --exit-code || ( echo "Run go mod tidy" && false )
gogenerate:
name: Check generated files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: arduino/setup-protoc@master
with:
version: '3.8.0'
- uses: actions/setup-go@v1
with:
go-version: 1.15
- name: Install proto-gen-go
run: go get -u github.com/golang/protobuf/[email protected]
- name: Install proto-gen-go
run: go get github.com/searKing/golang/tools/cmd/go-syncmap
- name: Generate files
run: go generate ./...
- name: Check for changes in generated code
- run: go generate ./...
- name: Check for changes
run: |
git diff -- '*.pb.go' || ( echo "Rerun go generate ./... locally and resubmit" && false )
git diff -- '*.gen.go' || ( echo "Rerun go generate ./... locally and resubmit" && false )
git diff --name-only --exit-code || ( echo "Rerun go generate ./... locally and resubmit" && false )
excludereplace:
name: Exclude Replace in go.mod
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ linters-settings:
dupl:
threshold: 150
funlen:
Lines: 150
Lines: 100
Statements: 50
goconst:
min-len: 2
Expand Down

0 comments on commit 6eb1167

Please sign in to comment.