mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 06:34:19 +01:00
Updates circleci
The sandbox won't be needed anymore, so the test env can be made simpler. Forks can be simulated via invalidateblock and reconsiderblock
This commit is contained in:
@@ -18,21 +18,18 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
# Get bitcoin_sandbox
|
||||
- run:
|
||||
name: Get bitcoin_sandbox
|
||||
command: git clone --single-branch --branch ln https://github.com/sr-gi/bitcoin_sandbox.git
|
||||
|
||||
# Download and cache dependencies
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v2-dependencies-{{ checksum "pisa/requirements.txt" }}-{{ checksum "pisa/requirements-dev.txt" }}-{{ checksum "apps/cli/requirements-dev.txt" }}-{{ checksum "bitcoin_sandbox/requirements.txt" }}
|
||||
- v3-dependencies-{{ checksum "pisa/requirements.txt" }}-{{ checksum "pisa/requirements-dev.txt" }}-{{ checksum "apps/cli/requirements-dev.txt" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- v2-dependencies-
|
||||
- v3-dependencies-
|
||||
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
sudo apt-get install snapd
|
||||
sudo snap install bitcoin-core
|
||||
pyenv local 3.7.0
|
||||
python3 -m venv venv
|
||||
. venv/bin/activate
|
||||
@@ -40,23 +37,11 @@ jobs:
|
||||
pip install -r pisa/requirements.txt
|
||||
pip install -r pisa/requirements-dev.txt
|
||||
pip install -r apps/cli/requirements-dev.txt
|
||||
pip install -r bitcoin_sandbox/requirements.txt
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- ./venv
|
||||
key: v2-dependencies-{{ checksum "pisa/requirements.txt" }}-{{ checksum "pisa/requirements-dev.txt" }}-{{ checksum "apps/cli/requirements-dev.txt" }}-{{ checksum "bitcoin_sandbox/requirements.txt" }}
|
||||
|
||||
# Build docker env for E2E testing
|
||||
- run:
|
||||
name: Build bitcoin_sandbox
|
||||
command: |
|
||||
cp test/pisa/e2e/bitcoin.conf bitcoin_sandbox/
|
||||
cp test/pisa/e2e/sandbox-conf.py bitcoin_sandbox/bitcoin_sandbox/conf.py
|
||||
cp bitcoin_sandbox/docker/Dockerfile_ubuntu_no_ln bitcoin_sandbox/Dockerfile
|
||||
. venv/bin/activate
|
||||
cd bitcoin_sandbox && python -m bitcoin_sandbox.run_scenarios
|
||||
|
||||
key: v3-dependencies-{{ checksum "pisa/requirements.txt" }}-{{ checksum "pisa/requirements-dev.txt" }}-{{ checksum "apps/cli/requirements-dev.txt" }}
|
||||
|
||||
# Run unit tests
|
||||
- run:
|
||||
@@ -83,6 +68,11 @@ jobs:
|
||||
. venv/bin/activate
|
||||
pytest test/apps/cli/unit
|
||||
|
||||
# Run bitcoind for E2E testing
|
||||
- run:
|
||||
name: Run bitcoind
|
||||
command: bitcoin-core.daemon -conf=test/pisa/e2e/bitcoin.conf
|
||||
|
||||
# Setup pisa for E2E testing
|
||||
- run:
|
||||
name: Setup pisa
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# Copy this file with your own configuration and save it as conf.py
|
||||
|
||||
# Docker
|
||||
DOCK_NETWORK_NAME = "pisa_net"
|
||||
DOCK_NETWORK_SUBNET = "172.16.0.0/16"
|
||||
DOCK_NETWORK_GW = "172.16.0.1"
|
||||
DOCK_CONTAINER_NAME_PREFIX = "btc_n"
|
||||
DOCK_IMAGE_NAME = "sandbox_btc"
|
||||
DOCKER_INI_PORT_MAPPING = 22000
|
||||
DOCKER_RPC_PORT_MAPPING = 18444
|
||||
DOCKER_ZMQ_BLOCK_PORT_MAPPING = 28334
|
||||
|
||||
# Log
|
||||
LOG_FILE = "bitcoin_sandbox.log"
|
||||
|
||||
# Graphs
|
||||
BITCOIN_GRAPH_FILE = "./graphs/basic3.graphml"
|
||||
LN_GRAPH_FILE = "./graphs/basic3_ln.graphml"
|
||||
DEFAULT_LN_GRAPH_WEIGHT = 10000
|
||||
Reference in New Issue
Block a user