Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:

strategy:
matrix:
node_version: [16.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
node_version: [ 16.x ]
os: [ ubuntu-latest, windows-latest, macOS-latest ]

steps:
- name: git checkout
Expand Down Expand Up @@ -63,8 +63,8 @@ jobs:

strategy:
matrix:
go_version: [1.18.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
go_version: [ 1.18.x ]
os: [ ubuntu-latest, windows-latest, macOS-latest ]

steps:
- name: git checkout
Expand All @@ -84,7 +84,7 @@ jobs:

- name: build backend binary
run: make build

- name: build CLI binaries
run: make go-install-cli

Expand Down Expand Up @@ -244,6 +244,19 @@ jobs:
- name: run check
run: make itest

- name: Zip log files on failure
if: ${{ failure() }}
timeout-minutes: 5
run: 7z a logs-itest.zip itest/**/*.log

- name: Upload log files on failure
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: logs-itest
path: logs-itest.zip
retention-days: 5

########################
# check PR updates release notes
########################
Expand All @@ -256,4 +269,4 @@ jobs:
uses: actions/checkout@v3

- name: release notes check
run: scripts/check-release-notes.sh
run: scripts/check-release-notes.sh
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ DOCKER_TOOLS = docker run \
-v $(shell bash -c "mkdir -p /tmp/go-lint-cache; echo /tmp/go-lint-cache"):/root/.cache/golangci-lint \
-v $$(pwd):/build litd-tools

ITEST_TAGS := integration itest $(LND_RELEASE_TAGS)
ITEST_TAGS := dev integration itest lowscrypt $(LND_RELEASE_TAGS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm not fully sure why the lowscrypt buildtag is added here? Maybe the commit message could be extended to specify that as well if this is intended :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right. Speeds up wallet creation by using weaker encryption. Added that to the commit message.

ITEST_LDFLAGS := $(call make_ldflags, $(ITEST_TAGS))

GREEN := "\\033[0;32m"
Expand Down Expand Up @@ -238,6 +238,10 @@ flake-unit:
@$(call print, "Flake hunting unit tests.")
while [ $$? -eq 0 ]; do GOTRACEBACK=all $(UNIT) -count=1; done

flake-itest-only:
@$(call print, "Flake hunting integration tests.")
while [ $$? -eq 0 ]; do make itest-only icase='${icase}'; done

# =========
# UTILITIES
# =========
Expand Down
21 changes: 12 additions & 9 deletions accounts/checkers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,14 @@ func testSendPayment(t *testing.T, uri string) {
}

lndMock := newMockLnd()
routerMock := newMockRouter()
errFunc := func(err error) {
lndMock.mainErrChan <- err
}
service, err := NewService(t.TempDir(), errFunc)
require.NoError(t, err)

err = service.Start(lndMock, lndMock, chainParams)
err = service.Start(lndMock, routerMock, chainParams)
require.NoError(t, err)

assertBalance := func(id AccountID, expectedBalance int64) {
Expand Down Expand Up @@ -615,7 +616,7 @@ func testSendPayment(t *testing.T, uri string) {
require.NoError(t, err)
assertBalance(acct.ID, 4000)

lndMock.assertPaymentRequests(t, map[lntypes.Hash]struct{}{
routerMock.assertPaymentRequests(t, map[lntypes.Hash]struct{}{
testHash: {},
})

Expand Down Expand Up @@ -646,7 +647,7 @@ func testSendPayment(t *testing.T, uri string) {
// was initiated.
assertBalance(acct.ID, 4000)

lndMock.assertNoPaymentRequest(t)
routerMock.assertNoPaymentRequest(t)

// The final test we will do is to have two send requests initiated
// before the response for the first one has been received.
Expand Down Expand Up @@ -708,13 +709,14 @@ func TestSendPaymentV2(t *testing.T) {
}

lndMock := newMockLnd()
routerMock := newMockRouter()
errFunc := func(err error) {
lndMock.mainErrChan <- err
}
service, err := NewService(t.TempDir(), errFunc)
require.NoError(t, err)

err = service.Start(lndMock, lndMock, chainParams)
err = service.Start(lndMock, routerMock, chainParams)
require.NoError(t, err)

assertBalance := func(id AccountID, expectedBalance int64) {
Expand Down Expand Up @@ -808,7 +810,7 @@ func TestSendPaymentV2(t *testing.T) {
require.NoError(t, err)
assertBalance(acct.ID, 4000)

lndMock.assertPaymentRequests(t, map[lntypes.Hash]struct{}{
routerMock.assertPaymentRequests(t, map[lntypes.Hash]struct{}{
testHash: {},
})

Expand Down Expand Up @@ -836,7 +838,7 @@ func TestSendPaymentV2(t *testing.T) {
// was initiated.
assertBalance(acct.ID, 4000)

lndMock.assertNoPaymentRequest(t)
routerMock.assertNoPaymentRequest(t)

// The final test we will do is to have two send requests initiated
// before the response for the first one has been received.
Expand Down Expand Up @@ -894,13 +896,14 @@ func TestSendToRouteV2(t *testing.T) {
}

lndMock := newMockLnd()
routerMock := newMockRouter()
errFunc := func(err error) {
lndMock.mainErrChan <- err
}
service, err := NewService(t.TempDir(), errFunc)
require.NoError(t, err)

err = service.Start(lndMock, lndMock, chainParams)
err = service.Start(lndMock, routerMock, chainParams)
require.NoError(t, err)

assertBalance := func(id AccountID, expectedBalance int64) {
Expand Down Expand Up @@ -998,7 +1001,7 @@ func TestSendToRouteV2(t *testing.T) {
require.NoError(t, err)
assertBalance(acct.ID, 4000)

lndMock.assertPaymentRequests(t, map[lntypes.Hash]struct{}{
routerMock.assertPaymentRequests(t, map[lntypes.Hash]struct{}{
testHash: {},
})

Expand Down Expand Up @@ -1028,7 +1031,7 @@ func TestSendToRouteV2(t *testing.T) {
// was initiated.
assertBalance(acct.ID, 4000)

lndMock.assertNoPaymentRequest(t)
routerMock.assertNoPaymentRequest(t)

// The final test we will do is to have two send requests initiated
// before the response for the first one has been received.
Expand Down
Loading
Loading