From 767f3b95efc6a876f2f4fdba089a930a8aab2745 Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Thu, 25 Mar 2021 21:49:19 +0300 Subject: [PATCH] chore: apply coverage analysis to all packages This allows us to see test coverage of packages that can't be unit-tested directly. Signed-off-by: Alexey Palazhchenko --- .codecov.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index a8b0224cc..c1a66dd88 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -5,7 +5,7 @@ coverage: status: project: default: - target: 26% + target: 15% threshold: 0.5% base: auto if_ci_failed: success diff --git a/Dockerfile b/Dockerfile index 9ac2134c7..ba6809d7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -369,7 +369,7 @@ RUN unlink /etc/ssl COPY --from=rootfs / / ARG TESTPKGS ENV PLATFORM container -RUN --security=insecure --mount=type=cache,id=testspace,target=/tmp --mount=type=cache,target=/.cache go test -v -covermode=atomic -coverprofile=coverage.txt -count 1 -p 4 ${TESTPKGS} +RUN --security=insecure --mount=type=cache,id=testspace,target=/tmp --mount=type=cache,target=/.cache go test -v -covermode=atomic -coverprofile=coverage.txt -coverpkg=${TESTPKGS} -count 1 -p 4 ${TESTPKGS} FROM scratch AS unit-tests COPY --from=unit-tests-runner /src/coverage.txt /coverage.txt