forked from algorand/py-algorand-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (36 loc) · 1.3 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
UNIT_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/unit.tags | paste -s -d: -))"
INTEGRATION_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/integration.tags | paste -s -d: -))"
generate-init:
python -m scripts.generate_init
check-generate-init:
python -m scripts.generate_init --check
black:
black --check .
mypy:
mypy algosdk
sdist-check:
python setup.py check -s
python setup.py check -s 2>&1 | (! grep -qEi 'error|warning')
lint: check-generate-init black mypy sdist-check
pytest-unit:
pytest tests/unit_tests
unit:
behave --tags=$(UNIT_TAGS) tests -f progress2
integration:
behave --tags=$(INTEGRATION_TAGS) tests -f progress2 --no-capture
display-all-python-steps:
find tests/steps -name "*.py" | xargs grep "behave" 2>/dev/null | cut -d: -f1 | sort | uniq | xargs awk "/@(given|step|then|when)/,/[)]/" | grep -E "(\".+\"|\'.+\')"
harness:
./test-harness.sh up
harness-down:
./test-harness.sh down
PYTHON_VERSION ?= 3.8
docker-pysdk-build:
docker build -t py-sdk-testing --build-arg PYTHON_VERSION="${PYTHON_VERSION}" .
docker-pysdk-run:
docker ps -a
docker run -it --network host py-sdk-testing:latest
# todo replace with ports from harness .env file
smoke-test-examples:
cd examples && bash smoke_test.sh && cd -
docker-test: harness docker-pysdk-build docker-pysdk-run