Skip to content

Commit

Permalink
Update ci with fixes learned from other repos (networkservicemesh#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
  • Loading branch information
edwarnicke authored and fkautz committed Jan 27, 2020
1 parent 8e5425a commit b7fa0d0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: 1.13.4
- run: |
go build -race ./...
# test:
Expand All @@ -38,7 +38,7 @@ jobs:
# - uses: actions/checkout@v1
# - uses: actions/setup-go@v1
# with:
# go-version: 1.13
# go-version: 1.13.4
# - name: Install gotestsum
# run: go get gotest.tools/gotestsum@v0.4.0
# - name: Run tests
Expand All @@ -59,6 +59,7 @@ jobs:
name: exclude fmt.Errorf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Exclude fmt.Errorf
run: |
if grep -r --include=*.go fmt.Errorf . ; then
Expand All @@ -69,10 +70,11 @@ jobs:
name: Restrict dependencies on github.com/networkservicemesh/*
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Restrict dependencies on github.com/networkservicemesh/*
run: |
for i in $(grep github.com/networkservicemesh/ go.mod | gsed 's;.*\(github.com\/networkservicemesh\/[a-zA-z\/]*\).*;\1;g' | sort -u);do
if [ "${i}" != "github.com/networkservicemesh/sdk" ] && [ "${i}" != "github.com/networkservicemesh/networkservicemesh/controlplane/api" ]; then
for i in $(grep github.com/networkservicemesh/ go.mod | grep -v '^module' | sed 's;.*\(github.com\/networkservicemesh\/[a-zA-z\/]*\).*;\1;g' | sort -u);do
if [ "${i}" != "github.com/networkservicemesh/sdk" ] && [ "${i}" != "github.com/networkservicemesh/api" ]; then
echo Dependency on "${i}" is forbidden
exit 1
fi
Expand All @@ -84,7 +86,7 @@ jobs:
# - uses: actions/checkout@v1
# - uses: actions/setup-go@v1
# with:
# go-version: 1.13
# go-version: 1.13.4
# - run: go mod tidy
# - name: Check for changes in go.mod or go.sum
# run: |
Expand All @@ -97,7 +99,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: 1.13.4
- name: Install go-header
run: 'go get github.com/denis-tingajkin/go-header@v0.2.1'
- name: Run go-header
Expand Down

0 comments on commit b7fa0d0

Please sign in to comment.