Skip to content

Commit eb5782b

Browse files
guggeroellemouton
authored andcommitted
make+GitHub: fix and run unit tests
1 parent 35083a1 commit eb5782b

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,23 @@ jobs:
177177
- name: compile rpc for golang
178178
run: make rpc
179179

180+
unit-race:
181+
name: unit-race
182+
runs-on: ubuntu-latest
183+
steps:
184+
- name: git checkout
185+
uses: actions/checkout@v2
186+
with:
187+
fetch-depth: 0
188+
189+
- name: setup go ${{ env.GO_VERSION }}
190+
uses: actions/setup-go@v2
191+
with:
192+
go-version: '${{ env.GO_VERSION }}'
193+
194+
- name: run check
195+
run: make unit-race
196+
180197
itest:
181198
name: integration test
182199
runs-on: ubuntu-latest

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ XARGS := xargs -L 1
5050

5151
LINT = $(LINT_BIN) run -v
5252

53+
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST)
54+
UNIT_RACE := $(UNIT) -race
55+
5356
include make/release_flags.mk
5457

5558
# We only return the part inside the double quote here to avoid escape issues
@@ -153,7 +156,8 @@ unit-cover: $(GOACC_BIN)
153156

154157
unit-race:
155158
@$(call print, "Running unit race tests.")
156-
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE)
159+
mkdir app/build && touch app/build/index.html
160+
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE) -tags="$(LND_RELEASE_TAGS)"
157161

158162
goveralls: $(GOVERALLS_BIN)
159163
@$(call print, "Sending coverage report.")

0 commit comments

Comments
 (0)