Commit Graph

36 Commits

Author SHA1 Message Date
Vlad Stan
eae5002b69
fix: pay invoice status (#2481)
* fix: rest `pay_invoice` pending instead of failed
* fix: rpc `pay_invoice` pending instead of failed
* fix: return "failed" value for payment
* fix: handle failed status for LNbits funding source
* chore: `phoenixd` todo
* test: fix condition
* fix: wait for payment status to be updated
* fix: fail payment when explicit status provided

---------

Co-authored-by: dni  <office@dnilabs.com>
2024-05-10 11:49:50 +02:00
dni ⚡
c030ccc4f8
fix: no need to create fake admin (#2485)
already is done inside regtest
2024-05-09 16:56:11 +02:00
dni ⚡
e607ab7a3e
test: restructure tests (#2444)
unit, api, wallets
* only run test-api for migration
2024-04-19 13:22:06 +02:00
dni ⚡
209e2c5bff
test: make nice pytest reports on github (#2376)
* test: make nice pytest reports on github
utilizing this action: https://github.com/pavelzw/pytest-action/
2024-04-05 08:35:51 +02:00
dni ⚡
cdc102af07
chore: update to node 20.x on workflows (#2364)
gets rid of deprecating warnings in actions
* checkout@v4
* cache@v4
* setup-python@v5
* setup-node@v4
* codecov-action@v4
* codecov pass token from ci
2024-03-26 14:18:58 +01:00
dni ⚡
194a527736
fix: regtest use new docker hub address (#2248)
* fix: regtest use new docker hub address
2024-02-09 08:46:33 +01:00
dni ⚡
62435b3723
[TEST] workflows, added 10s timeout to lncli subprocess and logging (#1910)
* [FIX] workflows

testing why workflwos unstable instable

* debug run_command

* add timeout to process run

* log lncli output

* try catch json exception in clnrest

* settle does not return a json

* add 10 minutes timeout to regtests if they ever get stuck

* better subprocess handling

* fix race condition

* test 3

* remove

* run nr 4

* increase waits for race conditions

* revert clnrest

* better fiat amount test
2023-08-30 11:01:32 +01:00
dni ⚡
6efe1a156b
[FEAT] add codecov token (#1908)
for better coverage reports
2023-08-28 13:49:33 +02:00
dni ⚡
c54f48ee73
[CI] improve on github workflows (#1889)
* [CI] making a proper github CI workflow
2023-08-24 12:36:37 +02:00
callebtc
3a653630f1
Wallets: add cln-rest (#1775)
* receive and pay works

* fix linter issues

* import Paymentstatus from core.models

* fix test real payment

* fix get_payment_status check in lnbits

* fix tests?

* simplify

* refactor AsyncClient

* inline import of get_wallet_class

fixes the previous cyclic import

* invoice stream working

* add notes as a reminder to get rid of labels when cln-rest supports payment_hash

* create Payment dummy classmethod

* remove unnecessary fields from dummy

* fixes tests?

* fix model

* fix cln bug (#1814)

* auth header

* rename cln to corelightning

* add clnrest to admin_ui

* add to clnrest allowed sources

* add allowed sources to .env.example

* allow macaroon files

* add corelightning rest to workflow

* proper env names

* cleanup routine

* log wallet connection errors and fix macaroon clnrest

* print error on connection fails

* clnrest: handle disconnects faster

* fix test use of get_payment_status

* make format

* clnrest: add unhashed_description

* add unhashed_description to test

* description_hash test

* unhashed_description not supported by clnrest

* fix checking_id return in api_payments_create_invoice

* refactor test to use client instead of api_payments

* formatting, some errorlogging

* fix test 1

* fix other tests, paid statuses was missing

* error handling

* revert unnecessary changes (#1854)

* apply review of motorina0

---------

Co-authored-by: jackstar12 <jkranawetter05@gmail.com>
Co-authored-by: jackstar12 <62219658+jackstar12@users.noreply.github.com>
Co-authored-by: dni  <office@dnilabs.com>
2023-08-23 08:59:39 +02:00
dni ⚡
213be79aaa
quickfix for failing checks (#1819)
root package is needed for tests

root package is needed for mypy

removing testfile
2023-07-11 13:25:35 +02:00
dni ⚡
f7cbe74d77
Update poetry to 1.5.1 (#1804)
* update poetry to 1.5.1 inside workflows

* update lock file to poetry 1.5.1

* test run 1

* test run 2

* run 3

* try different sortorder

* cli should use --no-root

here  are the refereneces.
https://python-poetry.org/docs/basic-usage/#installing-dependencies-only
https://pip.pypa.io/en/stable/topics/local-project-installs/#regular-installs

* cache migrations aswell

* test flake

* optimize docker image for regtest building

* playng

* remove test run 1

* remove run 2

* remove run 3

* run 4

* run 6

* run 7

* run 8

* run 9

* run 10
2023-07-11 12:46:40 +02:00
dni ⚡
c48e2329c5
TEST: fix tests for real wallets (#1761)
* fix tests for real wallets
* change realinvoice provider to lnd-1
* use lnd-3 for tests
* fix eclair tests
* use bullseye in dockerimage
2023-06-15 12:36:28 +02:00
dni ⚡
b2a963638d
TEST: update actions setup-python to v4 and checkout to v3, add caching to python (#1428)
* update actions setup-python to v4 and checkout to v3, add caching to python

* fix ordering of steps for poetry to be cached

* poetry setup ordering

* order in formatting.yml
2023-01-29 11:46:20 +01:00
dni ⚡
5a0b217d63
TEST: LNbits as fundingsource in regtest (#1402)
* lnbits funding source

* add create_fake_user to workflow

* change quotes in workflow ymal

* not use interactive docker exec

* update tools/create_fake_admin to not use lnbits imports

* formatting

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2023-01-26 10:43:12 +01:00
dni ⚡
36c881c4ce
add eclair fundingsource workflow / test (#1406) 2023-01-25 15:07:41 +01:00
dni ⚡
e106ec3e9c
FIX: improve workflow stability (#1397)
* FIX: improve workflow stability

* just testing

* just testing, nr. 3
2023-01-23 12:57:37 +01:00
dni ⚡
7218057ca2 update lock file and workflows to poetry 1.3.1 2022-12-27 13:20:07 +01:00
Arc
b46c06012d
Revert "make gh workflows only run on pull_request" 2022-10-06 17:51:36 +01:00
dni ⚡
79319faa21 make workflows only run on pull_request 2022-10-06 10:17:21 +02:00
dni ⚡
19b1374d51 fixing tests for new poetry version ^1.2 2022-09-27 17:44:52 +02:00
dni ⚡
8e06d779e7
add dependencies for corelightning and lndgrpc (#1003)
* add dependencies for corelightning and lndgrpc

* added wrong cln library, 🤦
2022-09-23 16:56:14 +03:00
dni ⚡
e0981ecede
change python version of lnd wallet (#996) 2022-09-23 10:58:19 +03:00
dni ⚡
88d38f7294
change docker image name for regtest tests (#931) 2022-08-29 10:55:35 +02:00
dni ⚡
3457ff101e
fix regtest (#867)
Co-authored-by: dni <dni.khr@gmail.com>
2022-08-12 21:05:13 +02:00
calle
4fc0a25d41
Mega-merge 4: Reenable LndWallet gRPC and use TrackPaymentV2 (#745)
* readd lndgrpc

* debug logging

* Use TrackPaymentV2

* /v2/router/track

* lnd_router_grpc

* flag for blocking check

* error handling

* fix name

* regtest lndgrpc

* new test pipeline

* fix env

* check for description hash

* remove unnecessary asserts for clarity

* assume that description_hash is a hash already

* no lock

* description hashing in backend

* restore bolt11.py

* /api/v1/payments with hex of description

* comment

* refactor wallets

* forgot eclair

* fix lnpay

* bytes directly

* make format

* mypy check

* make format

* remove old code

* WIP status check

* LND GRPC docs

* restore cln to main

* fix regtest

* import

* remove unused import

* format

* do not expect ok

* check ok

* delete comments
2022-08-09 11:49:39 +02:00
calle
8535d70d36
Poetry dev (#837)
* black and isort for tests

* black and isort for build

* use poetry in Makefile, update pyproject.toml dependencies and add configs for black, pytest, mypy, isort there

* switching github workflow to poetry

* set mininum version to python 3.7

* fix tests

* add types-protobuf to dev packages

* fix cln regtest

* update docs

* try fix 1

* mypy fix2

* fix isort formatting workflow

* add prettier to dev docs

* multiple valid python version for pyproject

* update poetry.lock

* remove development installation, not needed anymore

* fix migration workflows

* format into one test

* fix yaml

* fix pipeline

* fix pipeline

* fix again

* fix

* rename checks

* remove venv tests

* venv test once

Co-authored-by: dni <dni.khr@gmail.com>
2022-08-03 14:10:32 +02:00
calle
9c19b61e4a
Mega-merge 3: CLN update client lib with descriptionhash support (WIP) (#792)
* CoreLightningWallet
2022-08-01 16:41:50 +02:00
calle
c9c3dd3f66
add coverage report for regtest tests (#816) 2022-07-31 19:48:20 +02:00
calle
f24d593f00
Fix docker staticfiles (#811)
* Fix staticfiles for docker install

* docker build instructions

* all tests python 3.9

Co-authored-by: cryptoteun <73664763+cryptoteun@users.noreply.github.com>
2022-07-30 17:09:14 +02:00
dni ⚡
3ec9cb6c89
use main branch of regtest 2022-07-28 11:11:54 +02:00
dni ⚡
783502ebf8
faster regtest, docker build is not needed anymore (#794)
* docker build is not needed anymore as regtest now does not include lnbits

* faster regtest, because docker build -t lnbits . is not needed anymore

Co-authored-by: dni <dni.khr@gmail.com>
2022-07-28 11:09:03 +02:00
dni ⚡
4b5e113c03
Regtest update (#775)
* preparation pr for regtest update

* remove FIXMEs

Co-authored-by: dni <dni.khr@gmail.com>
2022-07-25 07:31:15 +02:00
calle
96af5fc3a7
CI: Test core/views/generic.py (#772)
* Adds tests for GET /wallet

* Update `httpx` to `0.23.0` and `http-core` to `0.15.0` in `venv` installation path

* Fix `secp256k1 = "==0.14.0"` and `cffi = "==1.15.0"`
2022-07-23 10:39:58 +02:00
calle
69516bb751
regtest on push (#742) 2022-07-16 14:17:45 +02:00
calle
99b6b9d71c
CI: regtest with LndRestWallet and CLightningWallet (#738)
* add regtest
* test LndRestWallet
* test CLightningWallet
2022-07-16 14:10:43 +02:00