diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 024e319..7e6a8dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -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" @@ -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