Skip to content

Commit

Permalink
Merge pull request #422 from ellemouton/runUnitTests
Browse files Browse the repository at this point in the history
Makefile+github: run unit tests
  • Loading branch information
guggero committed Sep 23, 2022
2 parents 237f49f + 3e23ae3 commit 15fd8c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,23 @@ jobs:
- name: run check
run: make unit-race

unit:
name: unit tests
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '${{ env.GO_VERSION }}'

- name: run check
run: make unit

itest:
name: integration test
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,16 @@ check: unit

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

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

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

goveralls: $(GOVERALLS_BIN)
Expand Down

0 comments on commit 15fd8c1

Please sign in to comment.