Skip to content

Commit

Permalink
secretservice: skip_secretservice_tests tag
Browse files Browse the repository at this point in the history
needed for ci and sandboxed tests in headless mode

Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed May 29, 2023
1 parent 8e87ceb commit 44260f8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
-
name: Test
run: |
make test COVERAGEDIR=${{ env.DESTDIR }}
make test COVERAGEDIR=${{ env.DESTDIR }} TEST_TAGS=skip_secretservice_tests
shell: bash
-
name: Upload coverage
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ RUN --mount=type=bind,target=. \

mkdir /out
xx-go --wrap
make test COVERAGEDIR=/out
make test COVERAGEDIR=/out TEST_TAGS=skip_secretservice_tests
EOT

FROM scratch AS test-coverage
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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
TEST_TAGS ?=

# 10.11 is the minimum supported version for osxkeychain
export MACOSX_DEPLOYMENT_TARGET = 10.11
Expand Down Expand Up @@ -44,7 +45,7 @@ release: # create release
.PHONY: test
test:
mkdir -p $(COVERAGEDIR)
go test -short -v -coverprofile=$(COVERAGEDIR)/coverage.txt -covermode=atomic ./...
go test -tags $(TEST_TAGS) -short -v -coverprofile=$(COVERAGEDIR)/coverage.txt -covermode=atomic ./...
go tool cover -func=$(COVERAGEDIR)/coverage.txt

.PHONY: lint
Expand Down
2 changes: 1 addition & 1 deletion secretservice/secretservice_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build linux && cgo
//go:build linux && cgo && !skip_secretservice_tests

package secretservice

Expand Down

0 comments on commit 44260f8

Please sign in to comment.