mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
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:
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
@@ -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 ./...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user