Skip to content

Commit

Permalink
ci: enable cgo for unit tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyzimmer committed Oct 30, 2023
1 parent 2fb7371 commit 7939b7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jobs:
~/.cache/go-build
- name: Run Unit Tests
env:
CGO_ENABLED: ${{ matrix.os == 'windows-latest' && '1' || '0' }}
run: make ci-test

build-binaries:
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ TEST_PARALLELISM := $(WIN_TEST_PARALLELISM)
endif

COVERAGE_FILE ?= coverage.out
TEST_ARGS ?= -v -cover -race -coverprofile=$(COVERAGE_FILE) -covermode=atomic -parallel=$(TEST_PARALLELISM)
TEST_ARGS ?= -v -cover -race -coverprofile=$(COVERAGE_FILE) -covermode=atomic -parallel=$(TEST_PARALLELISM)
CGO_ENABLED ?= 0

test: ## Run unit tests.
$(GO) run github.com/kyoh86/[email protected] test $(TEST_ARGS) ./...
CGO_ENABLED=$(CGO_ENABLED) $(GO) run github.com/kyoh86/[email protected] test $(TEST_ARGS) ./...
$(GO) tool cover -func=$(COVERAGE_FILE)

LINT_TIMEOUT := 10m
Expand Down

0 comments on commit 7939b7c

Please sign in to comment.