-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathTaskfile.yml
More file actions
75 lines (64 loc) · 1.63 KB
/
Taskfile.yml
File metadata and controls
75 lines (64 loc) · 1.63 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
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
---
version: '3'
vars:
ROOT:
sh: pwd
DOCKER_IMAGE_LINTER: alvarofpp/linter:latest
LINT_COMMIT_TARGET_BRANCH: origin/main
tasks:
install-hooks:
desc: Configura o git para usar os hooks do projeto
cmds:
- git config core.hooksPath .githooks
build:
desc: Builda a imagem Docker do projeto
deps:
- install-hooks
cmds:
- docker compose build --pull
build-no-cache:
desc: Builda a imagem Docker sem cache
deps:
- install-hooks
cmds:
- docker compose build --no-cache --pull
lint:
desc: Executa todos os linters
cmds:
- docker pull {{.DOCKER_IMAGE_LINTER}}
- >-
docker run --rm -v {{.ROOT}}:/app {{.DOCKER_IMAGE_LINTER}}
"lint-commit {{.LINT_COMMIT_TARGET_BRANCH}}
&& lint-markdown
&& lint-dockerfile
&& lint-yaml
&& lint-shell-script
&& lint-python"
lint-fix:
desc: Corrige problemas de lint do Python automaticamente
cmds:
- docker pull {{.DOCKER_IMAGE_LINTER}}
- >-
docker run --rm -v {{.ROOT}}:/app
{{.DOCKER_IMAGE_LINTER}} "lint-python-fix"
test:
desc: Executa os testes com pytest
cmds:
- uv run pytest
test-coverage:
desc: Executa os testes com cobertura (threshold 98%)
cmds:
- uv run pytest --cov=validate_docbr/
type-check:
desc: Executa verificação de tipos com ty
cmds:
- uv run ty check
ci:
desc: Executa lint e testes com cobertura (usado no CI)
cmds:
- task: lint
- task: test-coverage
shell:
desc: Abre um shell bash no container
cmds:
- docker compose run --rm app bash