-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
132 lines (113 loc) · 2.5 KB
/
Taskfile.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# https://taskfile.dev
# If not already done, install task with
# sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
# windows: choco install go-task or download from https://github.com/go-task/task/releases
version: '3'
tasks:
install:package:
label: 'install:{{.PACKAGE_NAME}}'
vars:
PACKAGE_NAME: '{{.PACKAGE_NAME}}'
COMMAND_NAME: '{{default .PACKAGE_NAME .COMMAND_NAME}}'
cmds:
- "pip install {{.PACKAGE_NAME}}"
status:
- 'command -v {{.COMMAND_NAME}}'
install:pre-commit:
cmds:
- task: install:package
vars:
PACKAGE_NAME: pre-commit
install:poetry:
cmds:
- task: install:package
vars:
PACKAGE_NAME: poetry
install:commitizen:
cmds:
- task: install:package
vars:
PACKAGE_NAME: commitizen
COMMAND_NAME: cz
install:mypy:
cmds:
- task: install:package
vars:
PACKAGE_NAME: mypy
install:jake:
cmds:
- task: install:package
vars:
PACKAGE_NAME: jake
install:jq:
cmds:
- cmd: apt-get update && apt-get install -y --no-install-recommends jq
platforms: ["linux"]
- cmd: chocolatey install jq
platforms: [ "windows" ]
status:
- command -v jq
install:yq:
deps:
- install:jq
cmds:
- task: install:package
vars:
PACKAGE_NAME: yq
init-pre-commit:
deps:
- install:pre-commit
cmds:
- pre-commit install
init:
deps:
- install:poetry
cmds:
- poetry install
- task: init-pre-commit
update:
deps:
- install:poetry
cmds:
- poetry update
lint:
deps:
- install:pre-commit
cmds:
- pre-commit run --all
security:
deps:
- install:yq
- install:jake
platforms: ["linux"]
cmds:
- tomlq -t 'del(.package[] | select(.category != "main"))' poetry.lock | jake ddt -t POETRY
mypy:
cmds:
- cmd: poetry install --with typing
- cmd: poetry run mypy psa_ccc
test:
cmds:
- poetry install --with test
- poetry run pytest --cov
default:
cmds:
- task: lint
- task: mypy
- task: test
- task: security
commit:
deps:
- install:commitizen
cmds:
- cz c
interactive: true
bump:
deps:
- install:commitizen
cmds:
- cz bump --changelog
docs:
cmds:
- poetry install --without main --with docs
- poetry run mkdocs serve