-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTaskfile
executable file
·64 lines (47 loc) · 1.39 KB
/
Taskfile
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
#!/bin/bash
function test {
if [ `uname` = "Darwin" ]
then
echo "installing dependncies for MacOS"
# check if has brew
brew install redis-cli
else
echo "installing dependencies for Debian like"
apt-get install redis-server
fi
echo "Configuring user in redis to test"
redis-cli SET "ADMIN" "xyz"
echo "running test"
py.test -s -v --cov=./ --cov-report term-missing -v
}
function fmt {
rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info ./out ./*/out ./.mypy_cache ./*/.mypy_cache */.pytest_cache \
.pytest_cache .serverless/* >> /dev/null
black -S -t py37 -t py38 -v --line-length 120 --exclude node_modules/* .
isort -j 4 --line-width 120 --use-parentheses --no-inline-sort --multi-line 3 --trailing-comma brandenburg tests
mypy ./ --ignore-missing-imports
}
function install {
echo "install task not implemented"
}
function build {
echo "build task not implemented"
}
function start {
echo "starting ..."
docker-compose -f platform/docker/docker-compose.yml up -d
uvicorn brandenburg.main:app --log-level trace --reload
}
function stop {
docker-compose -f platform/docker/docker-compose.yml down
}
function default {
start
}
function help {
echo "$0 <task> <args>"
echo "Tasks:"
echo "$0 start -> Para iniciar o ..."
}
TIMEFORMAT="Task completed in %3lR"
time ${@:-default}