1- on : [push, pull_request]
1+ on :
2+ pull_request :
3+ paths-ignore :
4+ - " **/*.md'"
5+ - " doc/*.{json,png,svg}"
6+ push :
7+ paths-ignore :
8+ - " **/*.md'"
9+ - " doc/*.{json,png,svg}"
10+
211name : Test
312jobs :
413 test :
@@ -15,48 +24,32 @@ jobs:
1524 with :
1625 go-version-file : go.mod
1726
18- - name : Get all changed files excluding docs and README
19- id : changed-files
20- uses : tj-actions/changed-files@v46
21- with :
22- files_ignore : |
23- **/*.md
24- doc/*.{json,png,svg}
25-
2627 - name : Run Revive Action by building from repository
272828- if : steps.changed-files.outputs.any_changed == 'true'
2929 with :
3030 exclude : " ./vendor/..."
3131 name : " Revive"
3232
3333 - name : Install kubebuilder tools
34- if : steps.changed-files.outputs.any_changed == 'true'
3534 run : ./hack/install-kubebuilder-tools.sh
3635
3736 - name : Generate code
38- if : steps.changed-files.outputs.any_changed == 'true'
3937 run : ./hack/generate-code.sh && hack/verify-codegen.sh
4038
4139 - name : Run go fmt
42- if : steps.changed-files.outputs.any_changed == 'true'
4340 run : go fmt ./...
4441 # run: diff -u <(echo -n) <(gofmt -d -s .)
4542
4643 - name : Run go vet
47- if : steps.changed-files.outputs.any_changed == 'true'
4844 run : go vet --tags=test ./...
4945
5046 - name : Install static check
51- if : steps.changed-files.outputs.any_changed == 'true'
5247 run : go install honnef.co/go/tools/cmd/staticcheck@latest
5348
5449 - name : Test
55- if : steps.changed-files.outputs.any_changed == 'true'
5650 run : sudo PATH=${PATH}:./bin ./hack/test-go.sh
5751
5852 - name : Send coverage
59- if : steps.changed-files.outputs.any_changed == 'true'
6053 uses : shogo82148/actions-goveralls@v1
6154 with :
6255 path-to-profile : coverage.out
@@ -78,28 +71,16 @@ jobs:
7871 with :
7972 go-version-file : go.mod
8073
81- - name : Get all changed files excluding docs and README
82- id : changed-files
83- uses : tj-actions/changed-files@v46
84- with :
85- files_ignore : |
86- **/*.md
87- doc/*.{json,png,svg}
88-
8974 - name : Install requirements
90- if : steps.changed-files.outputs.any_changed == 'true'
9175 run : sudo apt-get install nmap jq && ./hack/build-go.sh
9276
9377 - name : Get tools, setup KinD cluster test environment
94- if : steps.changed-files.outputs.any_changed == 'true'
9578 run : source hack/e2e-get-test-tools.sh && ./hack/e2e-setup-kind-cluster.sh --number-of-compute $NUMBER_OF_COMPUTE_NODES
9679
9780 - name : Clear test-cache
98- if : steps.changed-files.outputs.any_changed == 'true'
9981 run : go clean -testcache
10082
10183 - name : Execute golang based E2E tests
102- if : steps.changed-files.outputs.any_changed == 'true'
10384 env :
10485 KUBECONFIG : /home/runner/.kube/config
10586 NUMBER_OF_THRASH_ITER : 20
0 commit comments