Some checks failed
test-and-lint / test-and-lint (pull_request) Failing after 1m33s
33 lines
556 B
YAML
33 lines
556 B
YAML
name: test-and-lint
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test-and-lint:
|
|
runs-on: go-1.26
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
files="$(gofmt -l .)"
|
|
if [ -n "$files" ]; then
|
|
echo "$files"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Check modules
|
|
run: |
|
|
go mod tidy
|
|
git diff --exit-code go.mod go.sum
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Test
|
|
run: go test ./... |