/
.travis.yml
53 lines (52 loc) · 2.01 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
- XMR_VERSION=0.17.0.1
- TEST_DIR=~/test/
- BIN_DIRS=~/binaries
- PARTICL_BINDIR=${BIN_DIRS}/particl-${PART_VERSION}/bin
- BITCOIN_BINDIR=${BIN_DIRS}/bitcoin-${BTC_VERSION}/bin
- XMR_BINDIR=${BIN_DIRS}/monero-x86_64-linux-gnu-v${XMR_VERSION}
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 "$XMR_BINDIR" ]; then cd "$BIN_DIRS" && wget https://downloads.getmonero.org/cli/monero-linux-x64-v${XMR_VERSION}.tar.bz2 && tar xvf monero-linux-x64-v${XMR_VERSION}.tar.bz2; fi
script:
- cd $TRAVIS_BUILD_DIR
- export TEST_DATADIRS="${TEST_DIR}"
- export PARTICL_BINDIR="${PARTICL_BINDIR}"
- export BITCOIN_BINDIR="${BITCOIN_BINDIR}"
- export XMR_BINDIR="${XMR_BINDIR}"
- python setup.py test
after_success:
- echo "End test"
jobs:
include:
- stage: lint
env:
cache: false
install:
- travis_retry pip install flake8==3.8.3
- travis_retry pip install codespell==1.17.1
before_script:
script:
- PYTHONWARNINGS="ignore" flake8 --ignore=E501,F841,W503 --exclude=xmrswap/contrib,.eggs
- codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=tests/lint/spelling.ignore-words.txt -S contrib,.git,.eggs,*.pyc
after_success:
- echo "End lint"
- stage: test
env: