-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lets.yaml
70 lines (69 loc) · 1.89 KB
/
lets.yaml
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
shell: zsh
commands:
client:
description: generate openapi client
cmd: |
./scripts/generate_client.sh
run:
description: run <backend/worker/beat>
cmd: |
PACKAGE=alephium_stats
if [ -z "$APP_CONFIG" ]; then
export APP_CONFIG="dev"
fi
export APP_NAME="${PACKAGE}-${APP_CONFIG}"
cmd=$1
case "$cmd" in
worker)
celery --app=$PACKAGE.run_worker.celery $cmd -l error -c 4;;
beat)
celery --app=$PACKAGE.run_worker.celery $cmd -l error;;
backend)
python3 -m "$PACKAGE.run_$cmd";;
*)
echo "usage: <backend/worker/beat>";;
esac
# NOTE:actual no db necessary
# db:
# description: db
# cmd: |
# if [ -z "$APP_CONFIG" ]; then
# export APP_CONFIG="migration"
# fi
# export APP_NAME="alephium_stats-${APP_CONFIG}"
#
# cmd=$1
# case "$cmd" in
# start)
# docker pull mariadb:10.9
# docker run -d -p 3306:3306 --rm -e MYSQL_ROOT_PASSWORD=root --name mariadb mariadb:10.9
# ;;
# stop) docker stop mariadb;;
# upgrade) alembic upgrade head;;
# downgrade) alembic downgrade -1;;
# revision)
# if [ -z "$msg" ]; then
# echo "required: msg=<commit msg for db here>"
# return
# fi
#
# alembic revision --autogenerate -m "$msg"
# ;;
# *) echo "usage: db <start/stop/upgrade/downgrade/revision>";;
# esac
test:
description: run the tests
cmd: |
python3 -m pytest -s -p no:pytest-brownie
cov:
description: run coverage
cmd: |
python3 -m pytest -s tests -n auto -p no:pytest-brownie \
--cov-report term-missing:skip-covered \
--cov-config pytest.ini \
--cov=. tests/ \
-vv
env:
description: enable venv
cmd: |-
python3.11 -m poetry shell