Skip to content

CI: fix pyln versions matching #11

CI: fix pyln versions matching

CI: fix pyln versions matching #11

Workflow file for this run

name: CI
# Cancel duplicate jobs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
name: Test CLN=${{ matrix.lightning-version.cln }} PY=${{ matrix.python-version }}, BCD=${{ matrix.bitcoind-version }}, EXP=${{ matrix.experimental }}, DEP=${{ matrix.deprecated }}
strategy:
fail-fast: false
matrix:
bitcoind-version: ["26.0"]
experimental: [1]
deprecated: [0]
python-version: ["3.8", "3.12"]
lightning-version: [{cln: "v23.11.2", pyln: "23.11"}, {cln: "v24.02.1", pyln: "24.02"}]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Bitcoin ${{ matrix.bitcoind-version }} & install binaries
run: |
export BITCOIND_VERSION=${{ matrix.bitcoind-version }}
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIND_VERSION}/bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz
tar -xzf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz
sudo mv bitcoin-${BITCOIND_VERSION}/bin/* /usr/local/bin
rm -rf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz bitcoin-${BITCOIND_VERSION}
- name: Download Core Lightning ${{ matrix.lightning-version.cln }} & install binaries
run: |
url=$(curl -s https://api.github.com/repos/ElementsProject/lightning/releases/tags/${{ matrix.lightning-version.cln }} \
| jq '.assets[] | select(.name | contains("22.04")) | .browser_download_url' \
| tr -d '\"')
wget $url
sudo tar -xvf ${url##*/} -C /usr/local --strip-components=2
echo "CLN_VERSION=$(lightningd --version)" >> "$GITHUB_OUTPUT"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
export CLN_PATH=${{ github.workspace }}/lightning
export COMPAT=${{ matrix.deprecated }}
export EXPERIMENTAL_FEATURES=${{ matrix.experimental }}
export SLOW_MACHINE=1
export TEST_DEBUG=1
export TRAVIS=1
export VALGRIND=0
cd tests
./setup.sh
cd ..
pip3 install --user pyln-proto==${{ matrix.lightning-version.pyln }} pyln-client==${{ matrix.lightning-version.pyln }} pyln-testing==${{ matrix.lightning-version.pyln }}
pip3 install --user pytest-xdist
pytest -n=5 tests/test_vitality.py