mirror of
https://github.com/basicswap/basicswap.git
synced 2024-12-23 03:49:25 +00:00
55 lines
2.4 KiB
YAML
55 lines
2.4 KiB
YAML
dist: bionic
|
|
os: linux
|
|
language: python
|
|
python: '3.7'
|
|
stages:
|
|
- lint
|
|
- test
|
|
env:
|
|
global:
|
|
- PART_VERSION=0.19.1.1
|
|
- BTC_VERSION=0.20.1
|
|
- LTC_VERSION=0.18.1
|
|
- TEST_DIR=~/test_basicswap2/
|
|
- TEST_RELOAD_PATH=~/test_basicswap1/
|
|
- BIN_DIRS=~/binaries
|
|
- PARTICL_BINDIR=${BIN_DIRS}/particl-${PART_VERSION}/bin/
|
|
- BITCOIN_BINDIR=${BIN_DIRS}/bitcoin-${BTC_VERSION}/bin/
|
|
- LITECOIN_BINDIR=${BIN_DIRS}/litecoin-${LTC_VERSION}/bin/
|
|
cache:
|
|
directories:
|
|
- "$BIN_DIRS"
|
|
before_install:
|
|
- sudo apt-get install -y wget gnupg2
|
|
before_script:
|
|
- if [ ! -d "$BIN_DIRS" ]; then mkdir -p "$BIN_DIRS" ; fi
|
|
- if [ ! -d "$PARTICL_BINDIR" ]; then cd "$BIN_DIRS" && wget https://github.com/tecnovert/particl-core/releases/download/v${PART_VERSION}/particl-${PART_VERSION}-x86_64-linux-gnu.tar.gz && tar xvf particl-${PART_VERSION}-x86_64-linux-gnu.tar.gz ; fi
|
|
- if [ ! -d "$BITCOIN_BINDIR" ]; then cd "$BIN_DIRS" && wget https://bitcoincore.org/bin/bitcoin-core-${BTC_VERSION}/bitcoin-${BTC_VERSION}-x86_64-linux-gnu.tar.gz && tar xvf bitcoin-${BTC_VERSION}-x86_64-linux-gnu.tar.gz ; fi
|
|
- if [ ! -d "$LITECOIN_BINDIR" ]; then cd "$BIN_DIRS" && wget https://download.litecoin.org/litecoin-${LTC_VERSION}/linux/litecoin-${LTC_VERSION}-x86_64-linux-gnu.tar.gz && tar xvf litecoin-${LTC_VERSION}-x86_64-linux-gnu.tar.gz ; fi
|
|
script:
|
|
- cd $TRAVIS_BUILD_DIR
|
|
- export DATADIRS="${TEST_DIR}"
|
|
- mkdir -p ${DATADIRS}/bin/{particl,bitcoin}
|
|
- cp "${BIN_DIRS}/bitcoin-${BTC_VERSION}-x86_64-linux-gnu.tar.gz" "${DATADIRS}/bin/bitcoin"
|
|
- mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,bitcoin}
|
|
- cp "${BIN_DIRS}/particl-${PART_VERSION}-x86_64-linux-gnu.tar.gz" "${TEST_RELOAD_PATH}/bin/particl"
|
|
- cp "${BIN_DIRS}/bitcoin-${BTC_VERSION}-x86_64-linux-gnu.tar.gz" "${TEST_RELOAD_PATH}/bin/bitcoin"
|
|
- python setup.py test
|
|
after_success:
|
|
- echo "End test"
|
|
jobs:
|
|
include:
|
|
- stage: lint
|
|
env:
|
|
cache: false
|
|
install:
|
|
- travis_retry pip install flake8==3.5.0
|
|
- travis_retry pip install codespell==1.15.0
|
|
before_script:
|
|
script:
|
|
- PYTHONWARNINGS="ignore" flake8 --ignore=E501,F841,W503 --exclude=basicswap/contrib,messages_pb2.py,.eggs
|
|
- codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=tests/lint/spelling.ignore-words.txt -S .git,.eggs,gitianpubkeys,*.pyc,basicswap/contrib
|
|
after_success:
|
|
- echo "End lint"
|
|
- stage: test
|
|
env:
|