Skip to content

Commit

Permalink
Reduce unit test time
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaddoll committed Oct 4, 2024
1 parent ea3a90e commit 0821fa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,9 @@ cover_profile:

$Q echo Running special test cases without race detector:
$Q go test ./cmd/server/cadence/
$Q echo Running package tests:
$Q for dir in $(PKG_TEST_DIRS); do \
mkdir -p $(BUILD)/"$$dir"; \
go test "$$dir" $(TEST_ARG) -coverprofile=$(BUILD)/"$$dir"/coverage.out || exit 1; \
(cat $(BUILD)/"$$dir"/coverage.out | grep -v "^mode: \w\+" >> $(UNIT_COVER_FILE)) || true; \
done;
$Q echo Running all tests with coverage:
$Q go test $(PKG_TEST_DIRS) $(TEST_ARG) -coverprofile=$(UNIT_COVER_FILE) || exit 1


cover_integration_profile:
$Q mkdir -p $(BUILD)
Expand Down
5 changes: 5 additions & 0 deletions docker/buildkite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ ENV V=0
# allow git-status and similar to work
RUN git config --global --add safe.directory /cadence

COPY go.* ./
COPY cmd/server/go.* ./cmd/server/
COPY common/archiver/gcloud/go.* ./common/archiver/gcloud/
RUN go mod download

# https://github.com/docker-library/golang/blob/c1baf037d71331eb0b8d4c70cff4c29cf124c5e0/1.4/Dockerfile
RUN mkdir -p /cadence
WORKDIR /cadence

0 comments on commit 0821fa9

Please sign in to comment.