@@ -22,14 +22,14 @@ jobs:
2222        uses : actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe  #  v4.1.0
2323        with :
2424          go-version : ${{ matrix.go-version }} 
25-        
25+ 
2626      - name : Checkout code 
2727        uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac  #  v4.0.0
2828
2929      - name : Create test directory 
3030        run : | 
3131          mkdir -p ${{ env.TEST_RESULTS_PATH }} 
32-    
32+ 
3333       - name : Setup cache for go modules 
3434        uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57  #  v4.2.0
3535        with :
@@ -39,10 +39,10 @@ jobs:
3939           key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 
4040          restore-keys : | 
4141            ${{ runner.os }}-go- 
42-        
42+ 
4343       - name : Download go modules 
4444        run : go mod download 
45-        
45+ 
4646      #  Check go fmt output because it does not report non-zero when there are fmt changes
4747      - name : Run gofmt 
4848        run : | 
5353              echo "$files" 
5454              exit 1 
5555            fi 
56-        
56+ 
5757       - name : Install gotestsum 
5858        run : 
go install gotest.tools/[email protected]   5959
@@ -71,14 +71,14 @@ jobs:
7171          workload_identity_provider : ' projects/328212837253/locations/global/workloadIdentityPools/hc-go-getter-test/providers/github-hc-go-getter-test' 
7272          service_account : hc-go-getter-test@hc-e56c0f7c21c448d2be9e7696073.iam.gserviceaccount.com 
7373          audience : https://github.com/hashicorp 
74-          
74+ 
7575      - name : Run go tests 
7676        run : | 
7777          PACKAGE_NAMES=$(go list ./...) 
7878          echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" 
7979          echo $PACKAGE_NAMES 
8080          gotestsum --format=short-verbose --junitfile $TEST_RESULTS_PATH/go-getter/gotestsum-report.xml -- -p 2 -cover -coverprofile=linux_cov.part $PACKAGE_NAMES 
81-        
81+ 
8282       #  Save coverage report parts
8383      - name : Upload and save artifacts 
8484        uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 
@@ -104,7 +104,7 @@ jobs:
104104        uses : actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe  #  v4.1.0
105105        with :
106106          go-version : ${{ matrix.go-version }} 
107-        
107+ 
108108      - name : Checkout code 
109109        uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac  #  v4.0.0
110110
@@ -120,11 +120,11 @@ jobs:
120120
121121       - name : Download go modules 
122122        run : go mod download 
123-         
123+ 
124124      - name : Install gotestsum 
125125        shell : bash 
126126        run : 
go install gotest.tools/[email protected]   127-          
127+ 
128128      - name : Configure AWS Credentials 
129129        uses : aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497  #  v4.0.0
130130        with :
@@ -139,18 +139,28 @@ jobs:
139139          workload_identity_provider : ' projects/328212837253/locations/global/workloadIdentityPools/hc-go-getter-test/providers/github-hc-go-getter-test' 
140140          service_account : hc-go-getter-test@hc-e56c0f7c21c448d2be9e7696073.iam.gserviceaccount.com 
141141          audience : https://github.com/hashicorp 
142-        
142+ 
143143      - name : Run go tests 
144144        shell : bash 
145145        run : | 
146146          PACKAGE_NAMES=$(go list ./...) 
147147          echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" 
148148          echo $PACKAGE_NAMES 
149149          gotestsum --format=short-verbose --junitfile $TEST_RESULTS_PATH/go-getter/gotestsum-report.xml -- -p 2 -cover -race -coverprofile=win_cov.part $PACKAGE_NAMES 
150-        
150+ 
151151       #  Save coverage report parts
152152      - name : Upload and save artifacts 
153153        uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 
154154        with :
155155          name : windows-test-results-${{ matrix.go-version }} 
156-           path : win_cov.part 
156+           path : win_cov.part 
157+ 
158+   linter :
159+     runs-on : ubuntu-latest 
160+     steps :
161+       - name : Checkout code 
162+         uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac  #  v4.0.0
163+       - name : Lint code 
164+         uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9  #  v8.0.0
165+         with :
166+           args : --enable-only errcheck  #  this is temporary until the other lint errors are fixed
0 commit comments