Skip to content

Commit

Permalink
Activate ts2019 tag everywhere
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <[email protected]>
  • Loading branch information
kradalby committed Nov 3, 2022
1 parent 448f49f commit efd044d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ifeq ($(filter $(GOOS), openbsd netbsd soloaris plan9), )
else
endif

TAGS = -tags "ts2019"

# GO_SOURCES = $(wildcard *.go)
# PROTO_SOURCES = $(wildcard **/*.proto)
GO_SOURCES = $(call rwildcard,,*.go)
Expand All @@ -22,7 +24,7 @@ build:
dev: lint test build

test:
@go test -short -coverprofile=coverage.out ./...
@go test $(TAGS) -short -coverprofile=coverage.out ./...

test_integration: test_integration_cli test_integration_derp test_integration_oidc test_integration_v2_general

Expand All @@ -34,7 +36,7 @@ test_integration_cli:
-v ~/.cache/hs-integration-go:/go \
-v $$PWD:$$PWD -w $$PWD \
-v /var/run/docker.sock:/var/run/docker.sock golang:1 \
go test -failfast -timeout 30m -count=1 -run IntegrationCLI ./...
go test $(TAGS) -failfast -timeout 30m -count=1 -run IntegrationCLI ./...

test_integration_derp:
docker network rm $$(docker network ls --filter name=headscale --quiet) || true
Expand All @@ -44,7 +46,7 @@ test_integration_derp:
-v ~/.cache/hs-integration-go:/go \
-v $$PWD:$$PWD -w $$PWD \
-v /var/run/docker.sock:/var/run/docker.sock golang:1 \
go test -failfast -timeout 30m -count=1 -run IntegrationDERP ./...
go test $(TAGS) -failfast -timeout 30m -count=1 -run IntegrationDERP ./...

test_integration_oidc:
docker network rm $$(docker network ls --filter name=headscale --quiet) || true
Expand All @@ -54,7 +56,7 @@ test_integration_oidc:
-v ~/.cache/hs-integration-go:/go \
-v $$PWD:$$PWD -w $$PWD \
-v /var/run/docker.sock:/var/run/docker.sock golang:1 \
go test -failfast -timeout 30m -count=1 -run IntegrationOIDC ./...
go test $(TAGS) -failfast -timeout 30m -count=1 -run IntegrationOIDC ./...

test_integration_v2_general:
docker run \
Expand All @@ -64,7 +66,7 @@ test_integration_v2_general:
-v $$PWD:$$PWD -w $$PWD/integration \
-v /var/run/docker.sock:/var/run/docker.sock \
golang:1 \
go test ./... -timeout 60m -parallel 6
go test $(TAGS) ./... -timeout 60m -parallel 6

coverprofile_func:
go tool cover -func=coverage.out
Expand Down
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
version = headscaleVersion;
src = pkgs.lib.cleanSource self;

tags = ["ts2019"];

# Only run unit tests when testing a build
checkFlags = ["-short"];

Expand Down

0 comments on commit efd044d

Please sign in to comment.