* 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>
81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
name: regtest
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
LndRestWallet:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.9]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: abatilo/actions-poetry@v2.1.3
|
|
- name: Setup Regtest
|
|
run: |
|
|
git clone https://github.com/lnbits/legend-regtest-enviroment.git docker
|
|
cd docker
|
|
chmod +x ./tests
|
|
./tests
|
|
sudo chmod -R a+rwx .
|
|
- name: Install dependencies
|
|
run: |
|
|
poetry install
|
|
- name: Run tests
|
|
env:
|
|
PYTHONUNBUFFERED: 1
|
|
PORT: 5123
|
|
LNBITS_DATA_FOLDER: ./data
|
|
LNBITS_BACKEND_WALLET_CLASS: LndRestWallet
|
|
LND_REST_ENDPOINT: https://localhost:8081/
|
|
LND_REST_CERT: ./docker/data/lnd-1/tls.cert
|
|
LND_REST_MACAROON: ./docker/data/lnd-1/data/chain/bitcoin/regtest/admin.macaroon
|
|
run: |
|
|
sudo chmod -R a+rwx . && rm -rf ./data && mkdir -p ./data
|
|
make test-real-wallet
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
file: ./coverage.xml
|
|
CoreLightningWallet:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.9]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: abatilo/actions-poetry@v2.1.3
|
|
- name: Setup Regtest
|
|
run: |
|
|
git clone https://github.com/lnbits/legend-regtest-enviroment.git docker
|
|
cd docker
|
|
chmod +x ./tests
|
|
./tests
|
|
sudo chmod -R a+rwx .
|
|
- name: Install dependencies
|
|
run: |
|
|
poetry install
|
|
poetry add pyln-client
|
|
- name: Run tests
|
|
env:
|
|
PYTHONUNBUFFERED: 1
|
|
PORT: 5123
|
|
LNBITS_DATA_FOLDER: ./data
|
|
LNBITS_BACKEND_WALLET_CLASS: CoreLightningWallet
|
|
CORELIGHTNING_RPC: ./docker/data/clightning-1/regtest/lightning-rpc
|
|
run: |
|
|
sudo chmod -R a+rwx . && rm -rf ./data && mkdir -p ./data
|
|
make test-real-wallet
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
file: ./coverage.xml
|