Skip to content

Commit 15fd8c1

Browse files
authored
Merge pull request #422 from ellemouton/runUnitTests
Makefile+github: run unit tests
2 parents 237f49f + 3e23ae3 commit 15fd8c1

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,23 @@ jobs:
194194
- name: run check
195195
run: make unit-race
196196

197+
unit:
198+
name: unit tests
199+
runs-on: ubuntu-latest
200+
steps:
201+
- name: git checkout
202+
uses: actions/checkout@v2
203+
with:
204+
fetch-depth: 0
205+
206+
- name: setup go ${{ env.GO_VERSION }}
207+
uses: actions/setup-go@v2
208+
with:
209+
go-version: '${{ env.GO_VERSION }}'
210+
211+
- name: run check
212+
run: make unit
213+
197214
itest:
198215
name: integration test
199216
runs-on: ubuntu-latest

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,16 @@ check: unit
148148

149149
unit:
150150
@$(call print, "Running unit tests.")
151-
$(UNIT)
151+
mkdir -p app/build && touch app/build/index.html
152+
$(UNIT) -tags="$(LND_RELEASE_TAGS)"
152153

153154
unit-cover: $(GOACC_BIN)
154155
@$(call print, "Running unit coverage tests.")
155156
$(GOACC_BIN) $(COVER_PKG)
156157

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

162163
goveralls: $(GOVERALLS_BIN)

0 commit comments

Comments
 (0)