mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-13 16:01:28 +05:30
chore: use same target for sandboxed and native tests
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -95,14 +95,13 @@ jobs:
|
||||
echo -e "trust\n5\ny" | gpg --batch --no-tty --command-fd 0 --edit-key 7D851EB72D73BDA0
|
||||
pass init 7D851EB72D73BDA0
|
||||
fi
|
||||
go test -short -v -coverprofile=./coverage.txt -covermode=atomic ./...
|
||||
go tool cover -func=./coverage.txt
|
||||
make test COVERAGEDIR=${{ env.DESTDIR }}
|
||||
shell: bash
|
||||
-
|
||||
name: Upload coverage
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
file: ./coverage.txt
|
||||
file: ${{ env.DESTDIR }}/coverage.txt
|
||||
|
||||
test-sandboxed:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
+2
-2
@@ -86,8 +86,8 @@ RUN --mount=type=bind,target=. \
|
||||
gpg -k
|
||||
|
||||
mkdir /out
|
||||
xx-go test -short -v -coverprofile=/out/coverage.txt -covermode=atomic ./...
|
||||
xx-go tool cover -func=/out/coverage.txt
|
||||
xx-go --wrap
|
||||
make test COVERAGEDIR=/out
|
||||
EOT
|
||||
|
||||
FROM scratch AS test-coverage
|
||||
|
||||
@@ -7,6 +7,7 @@ GO_LDFLAGS = -s -w -X ${GO_PKG}/credentials.Version=${VERSION} -X ${GO_PKG}/cred
|
||||
|
||||
BUILDX_CMD ?= docker buildx
|
||||
DESTDIR ?= ./bin/build
|
||||
COVERAGEDIR ?= ./bin/coverage
|
||||
|
||||
.PHONY: all
|
||||
all: cross
|
||||
@@ -35,8 +36,10 @@ release: # create release
|
||||
./hack/release
|
||||
|
||||
.PHONY: test
|
||||
test: # tests all packages except vendor
|
||||
go test -v `go list ./... | grep -v /vendor/`
|
||||
test:
|
||||
mkdir -p $(COVERAGEDIR)
|
||||
go test -short -v -coverprofile=$(COVERAGEDIR)/coverage.txt -covermode=atomic ./...
|
||||
go tool cover -func=$(COVERAGEDIR)/coverage.txt
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
|
||||
Reference in New Issue
Block a user