2019-07-27 22:04:40 +00:00
dist : bionic
2019-07-17 15:12:06 +00:00
os : linux
language : python
2019-07-26 10:57:05 +00:00
python : '3.7'
2019-07-17 15:12:06 +00:00
stages :
- lint
2019-10-04 18:23:33 +00:00
- test
2019-07-17 15:12:06 +00:00
env :
2019-10-04 18:23:33 +00:00
global :
2020-12-03 23:46:01 +00:00
- PART_VERSION=0.19.1.2
2020-09-11 14:49:01 +00:00
- BTC_VERSION=0.20.1
- LTC_VERSION=0.18.1
2020-12-05 11:22:22 +00:00
- XMR_VERSION=0.17.1.5
2019-10-04 18:23:33 +00:00
- 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/
2020-12-05 11:22:22 +00:00
- MONERO_BINDIR=${BIN_DIRS}/monero-${XMR_VERSION}/bin/
2019-10-04 18:23:33 +00:00
cache :
directories :
- "$BIN_DIRS"
2019-07-27 22:04:40 +00:00
before_install :
2020-12-05 11:22:22 +00:00
- sudo apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config
2019-07-17 15:12:06 +00:00
before_script :
2019-10-04 18:23:33 +00:00
- if [ ! -d "$BIN_DIRS" ]; then mkdir -p "$BIN_DIRS" ; fi
2020-09-11 14:49:01 +00:00
- 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
2019-10-04 18:23:33 +00:00
- 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
2020-12-05 11:22:22 +00:00
- wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip
- unzip coincurve-anonswap.zip
- cd coincurve-anonswap
- python3 setup.py install --force
2019-07-17 15:12:06 +00:00
script :
- cd $TRAVIS_BUILD_DIR
2019-10-04 18:23:33 +00:00
- export DATADIRS="${TEST_DIR}"
2020-12-05 11:22:22 +00:00
- mkdir -p ${DATADIRS}/bin/{particl,bitcoin,monero}
2019-10-04 18:23:33 +00:00
- cp "${BIN_DIRS}/bitcoin-${BTC_VERSION}-x86_64-linux-gnu.tar.gz" "${DATADIRS}/bin/bitcoin"
2020-12-05 11:22:22 +00:00
- mkdir -p ${TEST_RELOAD_PATH}/bin/{particl,bitcoin,monero}
2019-10-04 18:23:33 +00:00
- 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"
2019-07-17 15:12:06 +00:00
- python setup.py test
after_success :
- echo "End test"
jobs :
include :
- stage : lint
env :
cache : false
install :
2020-12-06 17:34:56 +00:00
- travis_retry pip install flake8==3.7.0
2019-07-17 15:12:06 +00:00
- travis_retry pip install codespell==1.15.0
before_script :
script :
2020-09-11 16:42:53 +00:00
- PYTHONWARNINGS="ignore" flake8 --ignore=E501,F841,W503 --exclude=basicswap/contrib,messages_pb2.py,.eggs
2020-11-30 14:29:40 +00:00
- codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=tests/lint/spelling.ignore-words.txt -S .git,.eggs,gitianpubkeys,*.pyc,*basicswap/contrib,*mnemonics.py
2019-07-17 15:12:06 +00:00
after_success :
- echo "End lint"
2019-10-04 18:23:33 +00:00
- stage : test
env :