-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
90 lines (61 loc) · 1.81 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
####### Universal ######
pip:
pip install -e .
pip-development: pip
pip install -e.[development]
pip-notebooks: pip-development
pip install -e.[notebooks]
black:
black --check .
flake8:
flake8 graviton tests
mypy:
mypy .
lint: black flake8 mypy
unit-test:
pytest -sv tests/unit
build-and-test: pip-development lint unit-test
blackbox-smoke-prefix:
echo "hello blackbox!"
pwd
ls -l
ls -l sandbox
cd sandbox && docker-compose ps
NUM_PROCS = auto
VERBOSITY = -sv
integration-test:
pytest -n $(NUM_PROCS) --durations=10 $(VERBOSITY) tests/integration
notebooks-test:
pytest --nbmake -n $(NUM_PROCS) notebooks
all-tests: lint unit-test integration-test notebooks-test
###### Algod / Docker #####
algod-start:
docker compose up -d algod --wait
algod-version:
docker compose exec algod goal --version
algod-start-report: algod-start algod-version
algod-stop:
docker compose stop algod
###### Local Only ######
# assumes installations of pipx, build and tox via:
# `pip install pipx; pipx install build; pipx install tox`
local-project-build:
pyproject-build
# assumes a symbolic link: sandbox -> /cloned/repo/algorand/sandbox
local-sandbox-test:
./sandbox/sandbox test
local-blackbox-smoke: blackbox-smoke-prefix local-sandbox-test
local-blackbox: local-blackbox-smoke integration-test
NOTEBOOK = notebooks/quadratic_factoring_game.ipynb
# assumes already ran `make pip-notebooks`
local-notebook:
jupyter retro $(NOTEBOOK)
# assumes act is installed, e.g. via `brew install act`:
local-gh-simulate:
act
###### Github Actions Only ######
gh-sandbox-test:
# relax exit code condition because indexer returns 500 when last-round = 0
script -e -c "bash -x ./sandbox/sandbox test" || echo "finished ./sandbox test"
gh-blackbox-smoke: blackbox-smoke-prefix gh-sandbox-test
gh-blackbox: integration-test notebooks-test