build: align just test coverage gate with CI package list
Test / vet (push) Successful in 43s
Release / build (amd64, linux) (push) Successful in 41s
Release / build (arm64, linux) (push) Successful in 38s
Release / build (loong64, linux) (push) Successful in 39s
Release / build (riscv64, linux) (push) Successful in 38s
Test / test (push) Successful in 1m58s
Release / release (push) Successful in 18s
Test / build (push) Successful in 37s
Test / vet (push) Successful in 43s
Release / build (amd64, linux) (push) Successful in 41s
Release / build (arm64, linux) (push) Successful in 38s
Release / build (loong64, linux) (push) Successful in 39s
Release / build (riscv64, linux) (push) Successful in 38s
Test / test (push) Successful in 1m58s
Release / release (push) Successful in 18s
Test / build (push) Successful in 37s
Assisted-by: GLM 5.2
This commit is contained in:
@@ -18,8 +18,21 @@ build:
|
|||||||
@test -z "$(gofmt -l .)" || { echo "gofmt diff:"; gofmt -l .; exit 1; }
|
@test -z "$(gofmt -l .)" || { echo "gofmt diff:"; gofmt -l .; exit 1; }
|
||||||
|
|
||||||
# Full test suite + race detector + 80 % coverage gate.
|
# Full test suite + race detector + 80 % coverage gate.
|
||||||
|
# The coverage gate matches CI: it excludes packages that need hardware or
|
||||||
|
# are CLI glue (debug, cmd/gasm), so the number is identical locally and in CI.
|
||||||
test:
|
test:
|
||||||
go test -race -count=1 -coverprofile=coverage.out ./...
|
go test -race -count=1 ./...
|
||||||
|
go test -count=1 -coverprofile=coverage.out \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/arch \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/asm \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/ast \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/format \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/lexer \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/lint \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/lsp \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/parser \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/token \
|
||||||
|
sourcedock.dev/petrbalvin/gasm-devkit/verify
|
||||||
go tool cover -func=coverage.out | awk '/^total:/{gsub("%","",$3);if($3+0<80){print "coverage "$3"% < 80%";exit 1}print "coverage "$3"%"}'
|
go tool cover -func=coverage.out | awk '/^total:/{gsub("%","",$3);if($3+0<80){print "coverage "$3"% < 80%";exit 1}print "coverage "$3"%"}'
|
||||||
|
|
||||||
# Format all Go sources.
|
# Format all Go sources.
|
||||||
|
|||||||
Reference in New Issue
Block a user