Skip to content

Commit 44260f8

Browse files
committed
secretservice: skip_secretservice_tests tag
needed for ci and sandboxed tests in headless mode Signed-off-by: CrazyMax <[email protected]>
1 parent 8e87ceb commit 44260f8

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
-
105105
name: Test
106106
run: |
107-
make test COVERAGEDIR=${{ env.DESTDIR }}
107+
make test COVERAGEDIR=${{ env.DESTDIR }} TEST_TAGS=skip_secretservice_tests
108108
shell: bash
109109
-
110110
name: Upload coverage

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN --mount=type=bind,target=. \
8787

8888
mkdir /out
8989
xx-go --wrap
90-
make test COVERAGEDIR=/out
90+
make test COVERAGEDIR=/out TEST_TAGS=skip_secretservice_tests
9191
EOT
9292

9393
FROM scratch AS test-coverage

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ GO_LDFLAGS = -s -w -X ${GO_PKG}/credentials.Version=${VERSION} -X ${GO_PKG}/cred
88
BUILDX_CMD ?= docker buildx
99
DESTDIR ?= ./bin/build
1010
COVERAGEDIR ?= ./bin/coverage
11+
TEST_TAGS ?=
1112

1213
# 10.11 is the minimum supported version for osxkeychain
1314
export MACOSX_DEPLOYMENT_TARGET = 10.11
@@ -44,7 +45,7 @@ release: # create release
4445
.PHONY: test
4546
test:
4647
mkdir -p $(COVERAGEDIR)
47-
go test -short -v -coverprofile=$(COVERAGEDIR)/coverage.txt -covermode=atomic ./...
48+
go test -tags $(TEST_TAGS) -short -v -coverprofile=$(COVERAGEDIR)/coverage.txt -covermode=atomic ./...
4849
go tool cover -func=$(COVERAGEDIR)/coverage.txt
4950

5051
.PHONY: lint

secretservice/secretservice_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build linux && cgo
1+
//go:build linux && cgo && !skip_secretservice_tests
22

33
package secretservice
44

0 commit comments

Comments
 (0)