ci: gofmt/vet/race/vendor checks via Makefile; release reuses CI

- Makefile targets: build, test, race, fmt-check, vet, vendor-check, lint, ci
- ci.yml runs fmt-check, vet, vendor-check, build and race tests; also on
  rework/** branches and callable from release.yml
- gofmt the three files that were not formatted

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-31 23:02:31 +03:00
parent 1f6f400276
commit 829b1237b2
7 changed files with 98 additions and 36 deletions

View file

@ -4,7 +4,9 @@ on:
push:
branches:
- main
- "rework/**"
pull_request:
workflow_call:
jobs:
test:
@ -19,14 +21,17 @@ jobs:
go-version-file: go.mod
cache: true
- name: Vendor Go modules
run: go mod vendor
- name: gofmt
run: make fmt-check
- name: go vet
run: make vet
- name: vendor is up to date
run: make vendor-check
- name: Build
run: GOFLAGS=-mod=vendor go build ./...
run: make build
- name: Vet
run: GOFLAGS=-mod=vendor go vet ./...
- name: Test
run: GOFLAGS=-mod=vendor go test ./...
- name: Test (race)
run: make race

View file

@ -13,19 +13,7 @@ env:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run tests
run: GOFLAGS=-mod=vendor go test ./...
uses: ./.github/workflows/ci.yml
release:
needs: test