Skip to content

Commit 21a05d5

Browse files
authored
Merge pull request #663 from hashicorp/ci-workflow-updates
Use new make targets in CI
2 parents c152f81 + 1f6a0f7 commit 21a05d5

File tree

1 file changed

+30
-13
lines changed

1 file changed

+30
-13
lines changed

.github/workflows/checks.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,44 @@ jobs:
3939
run: |
4040
go test ./... -race
4141
42-
fmt_and_vet:
43-
name: "fmt and lint"
42+
copyright:
43+
name: "copyright headers"
4444
runs-on: ubuntu-latest
45+
steps:
46+
- name: "Fetch source code"
47+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
48+
- name: Install Go
49+
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
50+
with:
51+
go-version-file: go.mod
52+
- name: "copyright headers check"
53+
run: |
54+
make copyrightcheck
4555
56+
govet:
57+
name: "go vet"
58+
runs-on: ubuntu-latest
4659
steps:
4760
- name: "Fetch source code"
4861
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
4962
- name: Install Go
5063
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
5164
with:
5265
go-version-file: go.mod
53-
- name: "Check vet"
66+
- name: "go vet"
5467
run: |
55-
go vet ./...
56-
- name: "Check fmt"
68+
make vetcheck
69+
70+
gofmt:
71+
name: "gofmt"
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: "Fetch source code"
75+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
76+
- name: Install Go
77+
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
78+
with:
79+
go-version-file: go.mod
80+
- name: "gofmt"
5781
run: |
58-
go fmt ./...
59-
if [[ -z "$(git status --porcelain)" ]]; then
60-
echo "Formatting is consistent with 'go fmt'."
61-
else
62-
echo "Run 'go fmt ./...' to automatically apply standard Go style to all packages."
63-
git status --porcelain
64-
exit 1
65-
fi
82+
make fmtcheck

0 commit comments

Comments
 (0)