Skip to content

Commit fcf1bff

Browse files
committed
github actions: try running go mod tidy also
This verifies that our go.mod & go.sum are up to date.
1 parent a32c56c commit fcf1bff

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,30 @@ jobs:
3333
exit 1
3434
fi
3535
36+
verify-gomod:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Set up go
40+
uses: actions/setup-go@v2
41+
with:
42+
go-version: 1.14
43+
stable: true
44+
45+
- run: |
46+
echo "::set-env name=GOPATH::${HOME}/go"
47+
48+
- uses: actions/checkout@v2
49+
50+
- run: go mod tidy
51+
52+
- run: |
53+
changes=$(git status --porcelain)
54+
if [[ -n "${changes}" ]]; then
55+
echo "::error Changes detected from go mod tidy:"
56+
echo "${changes}"
57+
exit 1
58+
fi
59+
3660
kind-e2e:
3761
name: Test with a Kind cluster
3862
runs-on: [ubuntu-latest]
@@ -52,4 +76,4 @@ jobs:
5276
run: |
5377
kubectl get nodes -o wide
5478
kubectl get pods --all-namespaces -o wide
55-
kubectl get services --all-namespaces -o wide
79+
kubectl get services --all-namespaces -o wide

0 commit comments

Comments
 (0)