-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
48 lines (38 loc) · 2.17 KB
/
Taskfile.yml
File metadata and controls
48 lines (38 loc) · 2.17 KB
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
version: "3"
vars:
RUN_DEBUGPY: '/tmp/debugpy --listen 0.0.0.0:5673 --wait-for-client'
SH_ENTRYPOINT: '/bin/sh'
tasks:
# ------------------------------------------------------------------------------------------------
# - Help------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------
default:
aliases: ["help"]
desc: "prints help"
cmd: task --list
# ------------------------------------------------------------------------------------------------
# -Build------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------
build:
desc: builds dev image for main app and testing
cmd: docker-compose -f docker-compose.yml build
# ------------------------------------------------------------------------------------------------
# -Up---------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------
up:
desc: ups main app (USE_DEBUGPY=true for debug)
env:
BASE_COMMAND: '{{if eq .USE_DEBUGPY "true"}}{{.RUN_DEBUGPY}} -m app.main{{else}}{{end}}'
cmd: docker-compose -f docker-compose.yml up
up-test:
desc: ups coverage and unit-testing (USE_DEBUGPY=true for unit-testing only)
env:
BASE_ENTRYPOINT: '{{.SH_ENTRYPOINT}}'
BASE_COMMAND: '{{if eq .USE_DEBUGPY "true"}}-c "python {{.RUN_DEBUGPY}} -m pytest"{{else}}-c "coverage run -m pytest && coverage report && coverage html"{{end}}'
cmd: docker-compose -f docker-compose.yml -f docker-compose.test.yml up
# ------------------------------------------------------------------------------------------------
# -Pre-Commit-------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------
pre-commit:
desc: runs pre-commit hooks
cmd: pre-commit run --all-files