mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-28 11:14:29 +01:00
It was wrongly assumed that the lsp had to enforce a cltv delta +2. It is actually the recipient creating invoices with a cltv delta +2, but the LSP does not have anything to do with that.
197 lines
5.0 KiB
YAML
197 lines
5.0 KiB
YAML
name: integration tests
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
env:
|
|
BITCOIN_VERSION: '25.0'
|
|
LSP_REF: 'breez-node-v0.17.2-beta'
|
|
CLIENT_REF: 'v0.16.4-breez-3'
|
|
GO_VERSION: '^1.19'
|
|
CLN_VERSION: 'v23.11'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
|
|
setup-bitcoin-core:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Bitcoin Core
|
|
uses: ./.github/actions/setup-bitcoin
|
|
with:
|
|
bitcoin-version: ${{ env.BITCOIN_VERSION }}
|
|
|
|
setup-lnd-lsp:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up LND LSP
|
|
uses: ./.github/actions/setup-lnd-lsp
|
|
with:
|
|
lsp-ref: ${{ env.LSP_REF }}
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
setup-lnd-client:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up LND client
|
|
uses: ./.github/actions/setup-lnd-client
|
|
with:
|
|
client-ref: ${{ env.CLIENT_REF }}
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
setup-cln:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Core Lightning
|
|
uses: ./.github/actions/setup-clightning
|
|
with:
|
|
checkout-version: ${{ env.CLN_VERSION }}
|
|
|
|
build-lspd:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Build LSPD and Upload Artifacts
|
|
uses: ./.github/actions/build-lspd
|
|
|
|
setup-itest:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Setup itest
|
|
uses: ./.github/actions/setup-itest
|
|
|
|
|
|
run-test:
|
|
runs-on: ubuntu-22.04
|
|
needs:
|
|
- setup-itest
|
|
- setup-bitcoin-core
|
|
- setup-lnd-client
|
|
- setup-lnd-lsp
|
|
- setup-cln
|
|
- build-lspd
|
|
name: test ${{ matrix.lsp }}-lsp ${{ matrix.client }}-client ${{ matrix.test }}
|
|
strategy:
|
|
max-parallel: 4
|
|
matrix:
|
|
test: [
|
|
testRestartLspNode,
|
|
testOpenZeroConfChannelOnReceive,
|
|
testOpenZeroConfSingleHtlc,
|
|
testZeroReserve,
|
|
testFailureBobOffline,
|
|
testNoBalance,
|
|
testRegularForward,
|
|
testProbing,
|
|
testInvalidCltv,
|
|
registerPaymentWithTag,
|
|
testOpenZeroConfUtxo,
|
|
testDynamicFeeFlow,
|
|
testOfflineNotificationPaymentRegistered,
|
|
testOfflineNotificationRegularForward,
|
|
testOfflineNotificationZeroConfChannel,
|
|
]
|
|
lsp: [
|
|
LND,
|
|
CLN
|
|
]
|
|
client: [
|
|
LND,
|
|
CLN
|
|
]
|
|
exclude:
|
|
- lsp: CLN
|
|
client: LND
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run and Process Test State
|
|
uses: ./.github/actions/test-lspd
|
|
with:
|
|
TESTRE: "TestLspd/${{ matrix.lsp }}-lsp-${{ matrix.client}}-client:_${{ matrix.test }}"
|
|
artifact-name: TestLspd-${{ matrix.lsp }}-lsp-${{ matrix.client}}-client_${{ matrix.test }}
|
|
bitcoin-version: ${{ env.BITCOIN_VERSION }}
|
|
LSP_REF: ${{ env.LSP_REF }}
|
|
CLIENT_REF: ${{ env.CLIENT_REF }}
|
|
GO_VERSION: ${{ env.GO_VERSION }}
|
|
CLN_VERSION: ${{ env.CLN_VERSION }}
|
|
timeout: 6m
|
|
|
|
run-lsps2-test:
|
|
runs-on: ubuntu-22.04
|
|
needs:
|
|
- setup-itest
|
|
- setup-bitcoin-core
|
|
- setup-cln
|
|
- build-lspd
|
|
name: ${{ matrix.lsp }}-lsp ${{ matrix.client }}-client ${{ matrix.test }}
|
|
strategy:
|
|
max-parallel: 4
|
|
matrix:
|
|
test: [
|
|
testLsps0GetProtocolVersions,
|
|
testLsps2GetVersions,
|
|
testLsps2GetInfo,
|
|
testLsps2Buy,
|
|
testLsps2HappyFlow,
|
|
testLsps2NoBalance,
|
|
testLsps2ZeroConfUtxo
|
|
]
|
|
lsp: [
|
|
CLN
|
|
]
|
|
client: [
|
|
CLN
|
|
]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run and Process Test State
|
|
uses: ./.github/actions/test-lspd
|
|
with:
|
|
TESTRE: "TestLspd/${{ matrix.lsp }}-lsp-${{ matrix.client}}-client:_${{ matrix.test }}"
|
|
artifact-name: TestLspd-${{ matrix.lsp }}-lsp-${{ matrix.client}}-client_${{ matrix.test }}
|
|
bitcoin-version: ${{ env.BITCOIN_VERSION }}
|
|
LSP_REF: ${{ env.LSP_REF }}
|
|
CLIENT_REF: ${{ env.CLIENT_REF }}
|
|
GO_VERSION: ${{ env.GO_VERSION }}
|
|
CLN_VERSION: ${{ env.CLN_VERSION }}
|
|
timeout: 6m
|
|
|
|
run-unit-tests:
|
|
runs-on: ubuntu-22.04
|
|
name: Run unit tests
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Get dependencies
|
|
run: |
|
|
go get github.com/breez/lspd
|
|
go get github.com/breez/lspd/cln_plugin
|
|
go get github.com/breez/lspd/itest
|
|
|
|
- name: Test
|
|
run: go test -short `go list ./... | grep -v /itest`
|
|
|