CI: Add ./.../internal/... to fmt-go and test-go Make targets #5330

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2025-11-21 13:01:20 +01:00
parent be7c1f9607
commit 41cb9dc55a

View file

@ -407,10 +407,10 @@ reset-sqlite:
find ./internal -type f \( -iname '.*.db' -o -iname '.*.db-journal' -o -iname '.test.*' \) -delete
run-test-short:
$(info Running short Go tests in parallel mode...)
$(GOTEST) -parallel 2 -count 1 -cpu 2 -short -timeout 5m ./pkg/... ./internal/...
$(GOTEST) -parallel 2 -count 1 -cpu 2 -short -timeout 5m ./pkg/... ./internal/... ./.../internal/...
run-test-go:
$(info Running all Go tests...)
$(GOTEST) -parallel 1 -count 1 -cpu 1 -tags="slow,develop" -timeout 20m ./pkg/... ./internal/...
$(GOTEST) -parallel 1 -count 1 -cpu 1 -tags="slow,develop" -timeout 20m ./pkg/... ./internal/... ./.../internal/...
run-test-hub:
$(info Running all Go tests with hub requests...)
env PHOTOPRISM_TEST_HUB="true" $(GOTEST) -parallel 1 -count 1 -cpu 1 -tags="slow,develop,debug" -timeout 20m ./pkg/... ./internal/...
@ -440,16 +440,16 @@ run-test-photoprism:
$(GOTEST) -parallel 2 -count 1 -cpu 2 -tags="slow,develop" -timeout 20m ./internal/photoprism/...
test-parallel:
$(info Running all Go tests in parallel mode...)
$(GOTEST) -parallel 2 -count 1 -cpu 2 -tags="slow,develop" -timeout 20m ./pkg/... ./internal/...
$(GOTEST) -parallel 2 -count 1 -cpu 2 -tags="slow,develop" -timeout 20m ./pkg/... ./internal/... ./.../internal/...
test-verbose:
$(info Running all Go tests in verbose mode...)
$(GOTEST) -parallel 1 -count 1 -cpu 1 -tags="slow,develop" -timeout 20m -v ./pkg/... ./internal/...
$(GOTEST) -parallel 1 -count 1 -cpu 1 -tags="slow,develop" -timeout 20m -v ./pkg/... ./internal/... ./.../internal/...
test-race:
$(info Running all Go tests with race detection in verbose mode...)
$(GOTEST) -tags="slow,develop" -race -timeout 60m -v ./pkg/... ./internal/...
$(GOTEST) -tags="slow,develop" -race -timeout 60m -v ./pkg/... ./internal/... ./.../internal/...
test-coverage:
$(info Running all Go tests with code coverage report...)
go test -parallel 1 -count 1 -cpu 1 -failfast -tags="slow,develop" -timeout 30m -coverprofile coverage.txt -covermode atomic ./pkg/... ./internal/...
go test -parallel 1 -count 1 -cpu 1 -failfast -tags="slow,develop" -timeout 30m -coverprofile coverage.txt -covermode atomic ./pkg/... ./internal/... ./.../internal/...
go tool cover -html=coverage.txt -o coverage.html
go tool cover -func coverage.txt | grep total:
git-pull:
@ -946,7 +946,7 @@ lint-go:
fmt-js:
(cd frontend && npm run fmt)
fmt-go:
go fmt ./pkg/... ./internal/... ./cmd/...
go fmt ./pkg/... ./internal/... ./cmd/... ./.../internal/...
gofmt -w -s pkg internal cmd
goimports -w -local "github.com/photoprism" pkg internal cmd
tidy: