-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (63 loc) · 2.54 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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 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"]
include:
- cln-version: "v23.11.2"
pyln-testing-version: "23.11"
- cln-version: "v24.02.1"
pyln-testing-version: "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.cln-version }} & install binaries
run: |
url=$(curl -s https://api.github.com/repos/ElementsProject/lightning/releases/tags/${{ matrix.cln-version }} \
| 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
pip3 install --user pyln-testing=${{ matrix.pyln-testing-version }}
pip3 install --user pytest-xdist
pytest -n=5 test_vitality.py