Skip to content

Commit

Permalink
ci: add testing with -race
Browse files Browse the repository at this point in the history
Signed-off-by: Kir Kolyshkin <[email protected]>
  • Loading branch information
kolyshkin committed Oct 6, 2021
1 parent d5c430a commit 5aa42e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
fail-fast: false
matrix:
go-version: [1.15.x, 1.16.x, 1.17.x]
race: ["-race", ""]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand All @@ -62,7 +63,7 @@ jobs:
go-version: ${{ matrix.go-version }}

- name: build
run: make build
run: make BUILDFLAGS="${{ matrix.race }}" build

- name: test
run: make test
run: make TESTFLAGS="${{ matrix.race }}" test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GO ?= go
all: build build-cross

define go-build
GOOS=$(1) GOARCH=$(2) $(GO) build ./...
GOOS=$(1) GOARCH=$(2) $(GO) build ${BUILDFLAGS} ./...
endef

.PHONY: build
Expand Down

0 comments on commit 5aa42e5

Please sign in to comment.