Skip to content

Commit

Permalink
Add gofmt to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Starttoaster committed Feb 27, 2024
1 parent e9647b1 commit e9cf152
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,26 @@ jobs:
- uses: actions/checkout@v4

- name: Build
run: go build ./...
run: go build -o /dev/null ./...

- name: Test
run: go test ./...

- name: Check gofmt changes
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "Check local formatting with gofmt, the following files have formatting deviations:"
gofmt -s -l .
exit 1
fi
- name: Vet
run: go vet ./...

- name: Mod download
run: go mod download

- name: Mod verify
run: go mod verify
- name: Verify Go modules
run: |
go mod download
go mod verify
- name: Run govulncheck
run: |
Expand All @@ -38,10 +45,10 @@ jobs:
- name: Run staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...
- name: Run golint
run: |
go install golang.org/x/lint/golint
go install golang.org/x/lint/golint@latest
golint -set_exit_status ./...

0 comments on commit e9cf152

Please sign in to comment.