Skip to content

Commit

Permalink
ci: add lnd job
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Nov 30, 2024
1 parent 366d490 commit 602372c
Showing 1 changed file with 99 additions and 4 deletions.
103 changes: 99 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,50 @@ jobs:
name: ${{ runner.os }}-${{ runner.arch }}-cln-${{ matrix.cln.version}}
path: inst

itest:
name: Integration tests
compile-lnd:
runs-on: ubuntu-latest
strategy:
matrix:
lnd:
- version: jssdwt-v0.18.3-with-ca
org: breez
repo: lnd
go-version: 1.21.4

steps:
- name: Cache lnd
id: cache
uses: actions/cache@v4
with:
path: inst
key: ${{ runner.os }}-${{ runner.arch }}-lnd-${{ matrix.lnd.version}}

- name: Checkout
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: ${{ matrix.lnd.org }}/${{ matrix.lnd.repo }}
ref: ${{ matrix.lnd.version }}

- name: Setup go ${{ matrix.lnd.go-version }}
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.lnd.go-version }}'

- name: Compile lnd
if: steps.cache.outputs.cache-hit != 'true'
env:
GOPATH: /opt/lnd
run: make release-install

- uses: actions/upload-artifact@v4
name: Upload lnd artifact
with:
name: ${{ runner.os }}-${{ runner.arch }}-lnd-${{ matrix.lnd.version}}
path: /opt/lnd/bin/lnd

itest-cln:
name: Integration tests (cln)
needs: compile-cln
runs-on: ubuntu-latest
strategy:
Expand All @@ -182,7 +224,6 @@ jobs:
rustup toolchain install stable --profile minimal
- name: Install Protoc
if: steps.cache.outputs.cache-hit != 'true'
uses: arduino/setup-protoc@v3
with:
version: "27.4"
Expand Down Expand Up @@ -217,8 +258,62 @@ jobs:
TEST_DEBUG: 1
SLOW_MACHINE: 1
PYTEST_PAR: 5
run: make itest
run: make itest-cln

itest-lnd:
name: Integration tests (lnd)
needs: compile-lnd
runs-on: ubuntu-latest
strategy:
matrix:
lnd-version:
- jssdwt-v0.18.3-with-ca
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "27.4"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Install bitcoind
run: |
wget -q "https://bitcoincore.org/bin/bitcoin-core-26.1/bitcoin-26.1-x86_64-linux-gnu.tar.gz"
tar -xzf "bitcoin-26.1-x86_64-linux-gnu.tar.gz"
sudo cp -r "bitcoin-26.1/bin" "/usr/local"
rm -rf "bitcoin-26.1-x86_64-linux-gnu.tar.gz" "bitcoin-26.1"
- name: Download lnd artifact
uses: actions/download-artifact@v4
with:
name: ${{ runner.os }}-${{ runner.arch }}-lnd-${{ matrix.lnd-version}}
path: lnd-artifact

- name: Install lnd
run: |
chmod +x -R lnd-artifact/
sudo cp lnd-artifact/lnd /usr/local/bin
- name: Install virtualenv
run: python -m pip install --user virtualenv

- name: Integration tests
env:
TEST_DEBUG: 1
SLOW_MACHINE: 1
PYTEST_PAR: 5
run: make itest-lnd

utest:
name: Unit tests
runs-on: ubuntu-latest
Expand Down

0 comments on commit 602372c

Please sign in to comment.