Skip to content

Commit

Permalink
ci: Generate before check
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlehoux committed Oct 21, 2023
1 parent 8bc02d5 commit 6e4a561
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
set -ev

templ generate
gofmt -d -e -s .
go vet ./...
go run ./tools/cvet ./...
Expand All @@ -9,5 +10,4 @@ gosec -quiet -exclude-dir=tools/ ./...
gocyclo -over 10 -ignore '.*_templ\.go' .
golangci-lint run
go test ./...
go mod tidy
templ generate
go mod tidy
1 change: 1 addition & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ jobs:
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install github.com/a-h/templ/cmd/templ@latest
- name: Run git hooks
run: ./.githooks/pre-commit

0 comments on commit 6e4a561

Please sign in to comment.