ci: upload test report to CI
To make it possible, tweak a bit the Makefile Part-of: https://gitlab.postmarketos.org/postmarketOS/postmarketos-mkinitfs/-/merge_requests/63
This commit is contained in:
@@ -20,13 +20,17 @@ workflow:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
variables:
|
||||||
|
GOTEST: "gotestsum --junitfile report.xml --format testname -- ./..."
|
||||||
before_script:
|
before_script:
|
||||||
- apk -q add go staticcheck make scdoc
|
- apk -q add go gotestsum staticcheck make scdoc
|
||||||
script:
|
script:
|
||||||
- make test
|
- make test
|
||||||
- make
|
- make
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
reports:
|
||||||
|
junit: report.xml
|
||||||
|
|
||||||
vendor:
|
vendor:
|
||||||
stage: vendor
|
stage: vendor
|
||||||
|
5
Makefile
5
Makefile
@@ -12,7 +12,8 @@ GO?=go
|
|||||||
GOFLAGS?=
|
GOFLAGS?=
|
||||||
LDFLAGS+=-s -w -X main.Version=$(VERSION)
|
LDFLAGS+=-s -w -X main.Version=$(VERSION)
|
||||||
RM?=rm -f
|
RM?=rm -f
|
||||||
GOTEST=go test -count=1 -race
|
GOTESTOPTS?=-count=1 -race
|
||||||
|
GOTEST?=go test ./...
|
||||||
DISABLE_GOGC?=
|
DISABLE_GOGC?=
|
||||||
|
|
||||||
ifeq ($(DISABLE_GOGC),1)
|
ifeq ($(DISABLE_GOGC),1)
|
||||||
@@ -47,7 +48,7 @@ test:
|
|||||||
fi
|
fi
|
||||||
@staticcheck ./...
|
@staticcheck ./...
|
||||||
|
|
||||||
@$(GOTEST) ./...
|
$(GOTEST) $(GOTESTOPTS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) mkinitfs $(DOCS)
|
$(RM) mkinitfs $(DOCS)
|
||||||
|
Reference in New Issue
Block a user