Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #483

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,39 @@ on:

jobs:
build-and-test:
name: Test PY=${{ matrix.python-version }}, DEV=${{ matrix.developer }}, EXP=${{ matrix.experimental }}, DEP=${{ matrix.deprecated }}
name: Test PY=${{ matrix.python-version }}, EXP=${{ matrix.experimental }}, DEP=${{ matrix.deprecated }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
developer: [0,1]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
experimental: [1]
deprecated: [0]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Checkout c-lightning@master
uses: actions/checkout@v3
- name: Checkout c-lightning@v23.11
uses: actions/checkout@v4
with:
repository: 'ElementsProject/lightning'
path: 'lightning'
ref: 'master'
ref: 'v23.11'
submodules: 'recursive'
fetch-depth: 0 # Required for pyln versions to be recognized

- name: Download runtime dependencies
run: |
export BITCOIND_VERSION="0.20.1"
wget https://storage.googleapis.com/c-lightning-tests/bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.bz2
tar -xjf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.bz2
export BITCOIND_VERSION="22.0"
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: Compile & install c-lightning@master
run: |
export EXPERIMENTAL_FEATURES=${{ matrix.experimental }}
export DEVELOPER=${{ matrix.developer }}
export COMPAT=${{ matrix.deprecated }}
export VALGRIND=0
sudo apt-get install -y \
Expand Down Expand Up @@ -82,14 +80,13 @@ jobs:
sudo make install

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Test with pytest
run: |
export EXPERIMENTAL_FEATURES=${{ matrix.experimental }}
export DEVELOPER=${{ matrix.developer }}
export COMPAT=${{ matrix.deprecated }}
export SLOW_MACHINE=1
export TEST_DEBUG=1
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions drain/drain.py → archive/drain/drain.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def try_for_htlc_fee(payload, peer_id, amount, chunk, spendable_before):


def read_params(command: str, scid: str, percentage: float, chunks: int,
retry_for: int, maxfeepercent: float, exemptfee: Millisatoshi):
retry_for: int, maxfeepercent: float, exemptfee: int):

# check parameters
if command != 'drain' and command != 'fill' and command != 'setbalance':
Expand Down Expand Up @@ -466,7 +466,7 @@ def execute(payload: dict):

@plugin.method("drain")
def drain(plugin, scid: str, percentage: float = 100, chunks: int = 0, retry_for: int = 60,
maxfeepercent: float = 0.5, exemptfee: Millisatoshi = Millisatoshi(5000)):
maxfeepercent: float = 0.5, exemptfee: int = 5000):
"""Draining channel liquidity with circular payments.

Percentage defaults to 100, resulting in an empty channel.
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions drain/test_drain.py → archive/drain/test_drain.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from pyln.testing.fixtures import * # noqa: F401,F403
from pyln.testing.utils import DEVELOPER
from pyln.client import RpcError
from .utils import get_ours, get_theirs, wait_ours, wait_for_all_htlcs
import os
Expand All @@ -24,7 +23,6 @@ def test_plugin_starts(node_factory):
l1.start()


@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1")
def test_drain_and_refill(node_factory, bitcoind):
# Scenario: first drain then refill
#
Expand Down Expand Up @@ -84,7 +82,6 @@ def test_drain_and_refill(node_factory, bitcoind):
assert(get_theirs(l1, scid12) < theirs_before * 0.05)


@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1")
def test_fill_and_drain(node_factory, bitcoind):
# Scenario: first fill of an empty channel and drain afterwards.
#
Expand Down Expand Up @@ -133,7 +130,6 @@ def test_fill_and_drain(node_factory, bitcoind):
assert(get_theirs(l1, scid12) < theirs_before * 0.05) # account some reserves


@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1")
def test_setbalance(node_factory, bitcoind):
# SETUP: a basic circular setup to run setbalance tests
#
Expand Down Expand Up @@ -194,7 +190,6 @@ def balance(node, node_a, scid_a, node_b, scid_b, node_c):
wait_for_all_htlcs([node, node_a, node_b])


@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1")
def test_drain_chunks(node_factory, bitcoind):
# SETUP: a small mesh that enables testing chunks
#
Expand Down Expand Up @@ -277,7 +272,6 @@ def test_drain_chunks(node_factory, bitcoind):
assert(get_theirs(l1, scid41) > amount * 0.9)


@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1")
def test_fill_chunks(node_factory, bitcoind):
# SETUP: a small mesh that enables testing chunks
#
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 30 additions & 2 deletions historian/poetry.lock → archive/historian/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ license = "MIT"
[tool.poetry.dependencies]
python = "^3.7"
pyln-client = "0.11.1"
inotify = "^0.2.10"

[tool.poetry.dev-dependencies]
pyln-testing = "0.11.1"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions probe/test_probe.py → archive/probe/test_probe.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import unittest
import os
from pyln.testing.fixtures import * # noqa: F401,F403
from pyln.testing.utils import DEVELOPER

plugin_path = os.path.join(os.path.dirname(__file__), "probe.py")

Expand All @@ -18,7 +17,6 @@ def test_probe_starts(node_factory):
l1.start()


@unittest.skipIf(not DEVELOPER, "Gossip is slow")
def test_probe(node_factory):
l1, l2, l3, l4 = node_factory.line_graph(
4,
Expand All @@ -36,7 +34,6 @@ def test_probe(node_factory):
assert(res['failcode'] == 16399)


@unittest.skipIf(not DEVELOPER, "Gossip is slow")
def test_route_unreachable(node_factory):
l1, l2, l3, l4 = node_factory.line_graph(
4,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions summary/test_summary.py → archive/summary/test_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pyln.client import Plugin
from pyln.testing.fixtures import * # noqa: F401,F403
from pyln.testing.utils import DEVELOPER, wait_for
from pyln.testing.utils import wait_for

from .summary_avail import trace_availability

Expand Down Expand Up @@ -264,7 +264,6 @@ def test_summary_opts(directory):
assert(o in help_out)


@unittest.skipIf(not DEVELOPER, "We need fast gossip for line_graph")
def test_summary_exclude(node_factory):
l1, l2 = node_factory.line_graph(2, opts=pluginopt)

Expand Down
6 changes: 1 addition & 5 deletions feeadjuster/test_feeadjuster.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import unittest
from pyln.testing.fixtures import * # noqa: F401,F403
from pyln.testing.utils import DEVELOPER, wait_for
from pyln.testing.utils import wait_for


plugin_path = os.path.join(os.path.dirname(__file__), "feeadjuster.py")
Expand Down Expand Up @@ -70,7 +70,6 @@ def sync_gossip(nodes, scids):
wait_for(lambda: node.rpc.listchannels(scid) == n.rpc.listchannels(scid))


@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip")
def test_feeadjuster_adjusts(node_factory):
"""
A rather simple network:
Expand Down Expand Up @@ -140,7 +139,6 @@ def test_feeadjuster_adjusts(node_factory):
f'Adjusted fees of {scid_B} with a ratio of 0.2'])


@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip")
def test_feeadjuster_imbalance(node_factory):
"""
A rather simple network:
Expand Down Expand Up @@ -217,7 +215,6 @@ def test_feeadjuster_imbalance(node_factory):
wait_for_fees(l2, scids, default_fees[0])


@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip")
def test_feeadjuster_big_enough_liquidity(node_factory):
"""
A rather simple network:
Expand Down Expand Up @@ -292,7 +289,6 @@ def test_feeadjuster_big_enough_liquidity(node_factory):
wait_for_not_fees(l2, scids, default_fees[0])


@unittest.skipIf(not DEVELOPER, "Too slow without fast gossip")
def test_feeadjuster_median(node_factory):
"""
A rather simple network:
Expand Down
5 changes: 1 addition & 4 deletions jitrebalance/test_jitrebalance.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pyln.client import RpcError
from pyln.testing.fixtures import * # noqa: F401, F403
from pyln.testing.utils import wait_for, DEVELOPER
from pyln.testing.utils import wait_for
import os
import time
import pytest
Expand All @@ -13,7 +13,6 @@
reject_plugin = os.path.join(currdir, 'tests/refuse_htlcs.py')


@unittest.skipIf(not DEVELOPER, "gossip is too slow if we're not in developer mode")
def test_simple_rebalance(node_factory):
"""Simple rebalance that routes along a cycle to enable the original payment

Expand Down Expand Up @@ -82,7 +81,6 @@ def no_pending_htlcs():
assert l2.daemon.is_in_log('Succesfully re-filled outgoing capacity')


@unittest.skipIf(not DEVELOPER, "gossip is too slow if we're not in developer mode")
def test_rebalance_failure(node_factory):
"""Same setup as the first test :

Expand Down Expand Up @@ -158,7 +156,6 @@ def no_pending_htlcs():
assert l2.daemon.is_in_log('Timed out while trying to rebalance')


@unittest.skipIf(not DEVELOPER, "gossip is too slow if we're not in developer mode")
def test_issue_88(node_factory):
"""Reproduce issue #88: crash due to unconfirmed channel.

Expand Down
3 changes: 1 addition & 2 deletions noise/test_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pprint import pprint
from pyln.client import RpcError
from pyln.testing.fixtures import * # noqa: F401,F403
from pyln.testing.utils import DEVELOPER, wait_for
from pyln.testing.utils import wait_for
import hashlib
import os
import pytest
Expand Down Expand Up @@ -33,7 +33,6 @@ def test_sendmsg_success(node_factory, executor):


@flaky # since we cannot force a payment to take a specific route
@unittest.skipIf(not DEVELOPER, "Fails often")
@unittest.skipIf(True, "Just not stable")
def test_sendmsg_retry(node_factory, executor):
"""Fail a sendmsg using a cheap route, and check that it retries.
Expand Down
Loading