ci: add gofmt and golangci-lint checks to test workflow

Add code quality checks that run before tests:
- gofmt formatting verification
- golangci-lint static analysis
This commit is contained in:
Houmgaor
2026-01-30 00:44:38 +01:00
parent 0822835f1b
commit 65afcb5f41

View File

@@ -14,6 +14,19 @@ jobs:
with:
go-version: 1.25
- name: Check formatting
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "The following files are not formatted correctly:"
gofmt -l .
exit 1
fi
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Run tests
run: go test -v ./...