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:
|
2021-01-12 06:48:40 +00:00
|
|
|
- TEST_DIR=${HOME}/test_basicswap2
|
2021-01-10 18:30:07 +00:00
|
|
|
- TEST_RELOAD_PATH=~/test_basicswap1
|
2021-01-12 06:48:40 +00:00
|
|
|
- BIN_DIR=~/cached_bin
|
|
|
|
- PARTICL_BINDIR=${BIN_DIR}/particl
|
|
|
|
- BITCOIN_BINDIR=${BIN_DIR}/bitcoin
|
|
|
|
- LITECOIN_BINDIR=${BIN_DIR}/litecoin
|
|
|
|
- XMR_BINDIR=${BIN_DIR}/monero
|
2019-10-04 18:23:33 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
2021-01-12 06:48:40 +00:00
|
|
|
- "$BIN_DIR"
|
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
|
2021-01-10 18:30:07 +00:00
|
|
|
install:
|
|
|
|
- travis_retry pip install tox
|
2019-07-17 15:12:06 +00:00
|
|
|
before_script:
|
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
|
2021-01-11 21:48:46 +00:00
|
|
|
- python3 setup.py install
|
2021-01-12 06:48:40 +00:00
|
|
|
- basicswap-prepare --bindir=${BIN_DIR} --preparebinonly --withcoins=particl,bitcoin,litecoin,monero
|
2019-10-04 18:23:33 +00:00
|
|
|
- export DATADIRS="${TEST_DIR}"
|
2021-01-10 18:30:07 +00:00
|
|
|
- mkdir -p "${DATADIRS}/bin"
|
|
|
|
- cp -r ${BIN_DIR} "${DATADIRS}/bin"
|
|
|
|
- mkdir -p "${TEST_RELOAD_PATH}/bin"
|
|
|
|
- cp -r ${BIN_DIR} "${TEST_RELOAD_PATH}/bin"
|
|
|
|
- tox
|
2019-07-17 15:12:06 +00:00
|
|
|
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:
|
2021-01-10 18:30:07 +00:00
|
|
|
- PYTHONWARNINGS="ignore" flake8 --ignore=E501,F841,W503 --exclude=basicswap/contrib,messages_pb2.py,.eggs,.tox
|
|
|
|
- codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=tests/lint/spelling.ignore-words.txt -S .git,.eggs,.tox,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:
|