Skip to content

Commit 932c00a

Browse files
author
David Cavazos
committed
add go linting
1 parent f965b2d commit 932c00a

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.github/workflows/cloud-samples-tools-test.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,34 @@ env:
2727
GO_VERSION: ^1.22.0
2828

2929
jobs:
30+
lint:
31+
name: Lint
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 5
34+
defaults:
35+
run:
36+
working-directory: .github/cloud-samples-tools
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: actions/setup-go@v5
40+
with:
41+
go-version: ${{ env.GO_VERSION }}
42+
- name: Go vet
43+
run: go vet ./...
44+
- name: Check format
45+
run: test -z $(gofmt -l .)
46+
3047
test:
3148
name: Test
3249
runs-on: ubuntu-latest
3350
timeout-minutes: 5
51+
defaults:
52+
run:
53+
working-directory: .github/cloud-samples-tools
3454
steps:
3555
- uses: actions/checkout@v4
3656
- uses: actions/setup-go@v5
3757
with:
3858
go-version: ${{ env.GO_VERSION }}
39-
- run: go test ./test
40-
working-directory: .github/cloud-samples-tools
59+
- name: Run tests
60+
run: go test ./test

0 commit comments

Comments
 (0)