-
Notifications
You must be signed in to change notification settings - Fork 11
/
.cirrus.yml
91 lines (83 loc) · 3.42 KB
/
.cirrus.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
container:
# image: python:slim
# image: ubuntu:focal
# image: python:3.8-buster
image: registry.gitlab.com/cryptoadvance/specter-desktop/cirrus-focal:20210831
# We assume here that we're having a proper python3 system including virtualenv and pip
prep_stuff_template: &PREP_STUFF_TEMPLATE
bitcoind_installation_cache:
folder: ./tests/bitcoin
fingerprint_script:
- cat tests/bitcoin_gitrev_pinned 2> /dev/null || true
- cat /etc/os-release | grep VERSION
populate_script: ./tests/install_noded.sh --debug --bitcoin binary
verify_script:
- echo " --> Version of python, virtualenv and pip3"
- python3 --version && virtualenv --version && pip3 --version
- echo " --> Executables in tests/bitcoin/src"
- find tests/bitcoin/src -maxdepth 1 -type f -executable -exec ls -ld {} \; || true
- echo " --> Executables in tests/bitcoin/bin"
- find tests/bitcoin/bin -maxdepth 1 -type f -executable -exec ls -ld {} \; || true
- echo " --> bitcoind version"
- tests/bitcoin/src/bitcoind -version | head -1 || true
- tests/bitcoin/bin/bitcoind -version | head -1 || true
pip_script:
#folder: /tmp/cirrus-ci-build/.env
#fingerprint_script: echo muh && cat requirements.txt && cat test_requirements.txt
#populate_script:
- virtualenv --python=python .env
- source ./.env/bin/activate
- pip3 install -r requirements.txt --require-hashes && pip3 install -r test_requirements.txt
install_script:
- source ./.env/bin/activate
- pip3 install -e .
test_task:
pre_prep_script:
- apt-get update && apt-get install -y --no-install-recommends python3-dev python3-pip wget
<< : *PREP_STUFF_TEMPLATE
test_script:
- source ./.env/bin/activate
- echo $PATH
- pytest --cov=cryptoadvance --junitxml=./testresults.xml
always:
junit_artifacts:
path: "./testresults.xml"
format: junit
enhanced_test_task:
pre_prep_script:
- apt-get update && apt-get install -y --no-install-recommends python3-dev python3-pip wget
bitcoind_installation_cache:
folder: ./tests/bitcoin
fingerprint_script:
- cat tests/bitcoin_gitrev_pinned 2> /dev/null || true
- cat /etc/os-release | grep VERSION
populate_script: ./tests/install_noded.sh --debug --bitcoin compile
verify_script:
- echo " --> Version of python, virtualenv and pip3"
- python3 --version && virtualenv --version && pip3 --version
- echo " --> Executables in tests/bitcoin/src"
- find tests/bitcoin/src -maxdepth 1 -type f -executable -exec ls -ld {} \; || true
- echo " --> Executables in tests/bitcoin/bin"
- find tests/bitcoin/bin -maxdepth 1 -type f -executable -exec ls -ld {} \; || true
- echo " --> bitcoind version"
- tests/bitcoin/src/bitcoind -version | head -1 || true
- tests/bitcoin/bin/bitcoind -version | head -1 || true
pip_script:
#folder: /tmp/cirrus-ci-build/.env
#fingerprint_script: echo muh && cat requirements.txt && cat test_requirements.txt
#populate_script:
- virtualenv --python=python .env
- source ./.env/bin/activate
- pip3 install -r requirements.txt --require-hashes && pip3 install -r test_requirements.txt
install_script:
- source ./.env/bin/activate
- pip3 install -e .
test_script:
- source ./.env/bin/activate
- echo $PATH
#- pip3 install -e .
- pytest tests/traffic_gen.py
always:
junit_artifacts:
path: "./testresults.xml"
format: junit