fix(ci): make test targets depend on 'deps' in Makefile; add 'go mod tidy' before 'make test-short' in build.yml test job (consistent with release workflow fix for missing go.sum entries during go test builds)
This commit is contained in:
parent
4b91b905c5
commit
fefc6b8a5f
@ -27,7 +27,10 @@ jobs:
|
||||
run: go mod download
|
||||
|
||||
- name: Run tests (short)
|
||||
run: make test-short
|
||||
run: |
|
||||
go mod tidy
|
||||
make test-short
|
||||
# go mod tidy ensures go.sum is complete (fixes "missing go.sum entry" for configparser, wmenu, bubbles, bubbletea, lipgloss etc. during `go test`)
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
||||
6
Makefile
6
Makefile
@ -14,13 +14,13 @@ LDFLAGS = -s -w \
|
||||
-X '$(MODULE)/internal/version.BuildDate=$(DATE)' \
|
||||
-X 'main.version=$(VERSION)'
|
||||
|
||||
test:
|
||||
test: deps
|
||||
go test ./... -v -race
|
||||
|
||||
test-short:
|
||||
test-short: deps
|
||||
go test -short ./... -v -race
|
||||
|
||||
test-cover:
|
||||
test-cover: deps
|
||||
@mkdir -p build
|
||||
go test ./... -coverprofile=build/coverage.out
|
||||
go tool cover -html=build/coverage.out -o build/coverage.html
|
||||
|
||||
Loading…
Reference in New Issue
Block a user