This repository has been archived by the owner on Jul 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
108 lines (77 loc) · 2.38 KB
/
Makefile
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#
# == Paths & Directories ==
#
ROOT_DIR := $(shell pwd)
NODE_DIR := $(ROOT_DIR)/node_modules
VENV_DIR := $(ROOT_DIR)/.venv
#
# == Configuration ==
#
#
# == Commands ==
#
MKDIR := mkdir -p
LN := ln
FIND := find
PIPENV := pipenv
PYTHON := python
NPM := npm
#
# == Top-Level Targets ==
#
default: dependencies
dependencies: python-dependencies nodejs-dependencies
dev-dependencies: python-dependencies-dev nodejs-dependencies-dev
freeze:
$(PIPENV) lock
$(NPM) shrinkwrap
purge:
rm -r $(NODE_DIR)
rm -r $(VENV_DIR)
server:
$(NPM) start
test: python-test
test-integration: python-test-integration
test-full: python-test-full
#
# == Dependencies ==
#
python-dependencies:
PIPENV_VENV_IN_PROJECT=true $(PIPENV) install --ignore-pipfile
nodejs-dependencies:
$(NPM) install --production
python-dependencies-dev:
PIPENV_VENV_IN_PROJECT=true $(PIPENV) install --ignore-pipfile --dev
nodejs-dependencies-dev:
$(NPM) install
#
# == Testing ==
#
python-test:
$(PIPENV) run pytest -m "not integration" --cov=pymultisig --cov-config pymultisig/tests/.coveragerc
# Ideally, instead of 'plug in trezor', we just started a trezor emulator...
python-test-integration:
@printf '%s\n' '-----------------'
@printf '%s\n' "| Plug in Trezor |"
@printf '%s\n' '-----------------'
@read -n1 -r -p "Then press space to continue..." key
@printf '\n'
$(PIPENV) run pytest -m "integration" --cov=pymultisig --cov-config pymultisig/tests/.coveragerc -vv
python-test-full:
- $(PIPENV) run pytest -m "not integration" --cov=pymultisig --cov-config pymultisig/tests/.coveragerc
@printf '%s\n' '-----------------'
@printf '%s\n' "| Plug in Trezor |"
@printf '%s\n' '-----------------'
@read -n1 -r -p "Then press space to continue..." key
@printf '\n'
$(PIPENV) run pytest -m "integration" --cov-append --cov=pymultisig --cov-config pymultisig/tests/.coveragerc
js-test:
NODE_ENV="test" $(MOCHA) --recursive --grep @integration --invert --require babel-register --require babel-polyfill --require ./test/testHelper.js
js-test-integration:
@printf '%s\n' '-----------------'
@printf '%s\n' "| Plug in Ledger |"
@printf '%s\n' '-----------------'
@read -n1 -r -p "Then press space to continue..." key
@printf '\n'
NODE_ENV="test" $(MOCHA) --recursive --grep @integration-ledger --require babel-register --require babel-polyfill --require ./test/testHelper.js
.PHONY: test