File tree Expand file tree Collapse file tree 3 files changed +76
-20
lines changed Expand file tree Collapse file tree 3 files changed +76
-20
lines changed Original file line number Diff line number Diff line change 1919
2020      - uses : actions/checkout@v2 
2121
22-       - name : verify goimports 
23-         run : | 
24-           files=$(go run golang.org/x/tools/cmd/goimports -format-only -l .) 
25-           # Sadly goimports doesn't use exit codes 
26-           if [[ -n "${files}" ]]; then 
27-             echo "::error ::goimports should be run on these files:" 
28-             echo "${files}" 
29-             exit 1 
30-           fi 
22+       - name : verify-goimports 
23+         run : dev/ci/presubmits/verify-goimports 
24+ 
3125
3226  verify-gomod :
3327    runs-on : ubuntu-latest 
4034
4135      - uses : actions/checkout@v2 
4236
43-       - run : dev/format-gomod 
44- 
45-       - run : | 
46-           changes=$(git status --porcelain) 
47-           if [[ -n "${changes}" ]]; then 
48-             echo "::error Changes detected from dev/format-gomod:" 
49-             echo "::error (You may need to run go clean -cache -modcache)" 
50-             git diff | head -n60 
51-             echo "${changes}" 
52-             exit 1 
53-           fi 
37+       - name : verify-gomod 
38+         run : dev/ci/presubmits/verify-gomod 
5439
5540  kind-e2e :
5641    name : Test with a Kind cluster 
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ 
3+ #  Copyright 2025 The Kubernetes Authors.
4+ # 
5+ #  Licensed under the Apache License, Version 2.0 (the "License");
6+ #  you may not use this file except in compliance with the License.
7+ #  You may obtain a copy of the License at
8+ # 
9+ #      http://www.apache.org/licenses/LICENSE-2.0
10+ # 
11+ #  Unless required by applicable law or agreed to in writing, software
12+ #  distributed under the License is distributed on an "AS IS" BASIS,
13+ #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ #  See the License for the specific language governing permissions and
15+ #  limitations under the License.
16+ 
17+ 
18+ #  CI script to keep all files formatted with goimporrts
19+ 
20+ set  -o errexit
21+ set  -o nounset
22+ set  -o pipefail
23+ 
24+ #  cd to the repo root
25+ REPO_ROOT=$( git rev-parse --show-toplevel) 
26+ cd  " ${REPO_ROOT} " 
27+ 
28+ files=$( go run golang.org/x/tools/cmd/goimports -format-only -l .) 
29+ #  Sadly goimports doesn't use exit codes
30+ if  [[ -n  " ${files} " ;  then 
31+     echo  " ::error ::goimports should be run on these files:" 
32+     echo  " ${files} " 
33+     exit  1
34+ fi 
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ 
3+ #  Copyright 2025 The Kubernetes Authors.
4+ # 
5+ #  Licensed under the Apache License, Version 2.0 (the "License");
6+ #  you may not use this file except in compliance with the License.
7+ #  You may obtain a copy of the License at
8+ # 
9+ #      http://www.apache.org/licenses/LICENSE-2.0
10+ # 
11+ #  Unless required by applicable law or agreed to in writing, software
12+ #  distributed under the License is distributed on an "AS IS" BASIS,
13+ #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ #  See the License for the specific language governing permissions and
15+ #  limitations under the License.
16+ 
17+ 
18+ #  CI script to keep all our go.mod/go.sum updated
19+ 
20+ set  -o errexit
21+ set  -o nounset
22+ set  -o pipefail
23+ 
24+ #  cd to the repo root
25+ REPO_ROOT=$( git rev-parse --show-toplevel) 
26+ cd  " ${REPO_ROOT} " 
27+ 
28+ dev/format-gomod
29+ 
30+ changes=$( git status --porcelain) 
31+ if  [[ -n  " ${changes} " ;  then 
32+     echo  " ::error Changes detected from dev/format-gomod:" 
33+     echo  " ::error (You may need to run go clean -cache -modcache)" 
34+     git diff |  head -n60
35+     echo  " ${changes} " 
36+     exit  1
37+ fi 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments